LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2009, 10:57 AM   #1
preeteshbarretto
LQ Newbie
 
Registered: Feb 2009
Posts: 6

Rep: Reputation: 0
fedora equivalent to setenv


hi there is an application i am trying to install in fedora 10 , but i am getting an error saying that command does not exist .

this is the instruction that i am supposed to follow

Add the new directory to your path. If the directory, for example, is /home/tupac/codeploy, on tcsh, you execute the following commands:
setenv PATH /home/tupac/codeploy:$PATH
rehash

however the setenv doesnt seem to exist in the fedora library..so wats the alternative for this .??

and what do they mean by on tcsh ??
 
Old 02-22-2009, 11:11 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Tcsh is a shell,Linux distros use BASH shell by default.You can change shell in Linux with command;
Code:
$ chsh
or
Code:
$ ypchsh
Path to the shell is /bin/name _of _the_shell.
 
Old 02-22-2009, 09:24 PM   #3
gergely89
Member
 
Registered: Feb 2009
Posts: 100

Rep: Reputation: 21
Writing in bash
Quote:
PATH=/home/tupac/codeploy:$PATH
should give the same result as tcsh's
Quote:
setenv PATH /home/tupac/codeploy:$PATH
linux

Last edited by gergely89; 02-27-2009 at 10:45 PM.
 
Old 02-22-2009, 10:41 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
or in fedora open the file " .bash_profile " in your home folder and add /home/tupac/codeploy
Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs
# --- edited for posting your path maybe different ---
PATH=$PATH:/sbin:/usr/bin:/usr/sbin:/home/tupac/codeploy:$HOME
export PATH
then logout and log back in
 
Old 02-22-2009, 11:52 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by John VV View Post
... then logout and log back in
In case that wasn't clear, I think he means "Start a new terminal session," not "Reboot" or "Restart the X-server"

And the tcsh is available in the Fedora repositories. Try a sudo yum install tcsh and then you should be able to use that as your shell instead of bash. You can use the login manager to reset your default shell.
 
Old 02-23-2009, 12:44 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
no I MEANT log out of gnome and log back in to gnome ( or restart x ) that way the .bash_profile will be READ again
 
Old 02-23-2009, 10:29 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
John, the .bash_profile is read when you start a bash shell, and the X-server is not a shell script. In any case the X-server is (usually) a root process so changes to ~/.bash_profile or ~/.bashrc in a user's directory would have no effect on the way the X-server works.

For what the OP want's to do, a local shell ("terminal session") needs to be opened, and that's when the changes to the PATH variable need to be implemented.

If you want system-wide PATH changes, you can add them to /etc/rc.d/rc.local or change /etc/profile. (There has been some "rumbling" amongst the Fedora developers about adding the sbin directories to the user PATH since most of the restricted commands behave appropriately when started by a user without "root" privileges, but that "most" seems to be a "show stopper.")
 
Old 02-23-2009, 10:41 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by PTrenholme View Post
John, the .bash_profile is read when you start a bash shell, and the X-server is not a shell script. In any case the X-server is (usually) a root process so changes to ~/.bash_profile or ~/.bashrc in a user's directory would have no effect on the way the X-server works.
It all comes down at how do you login. The contents of /etc/profile will be sourced after init comes into scene, and thus, inherited by the rest of the bash sessions regardless of the user.

But if you login on command line then ~/.bash_profile will be sourced since you started a interactive login shell. Hence, when you later do startx and open a given terminal in X these settings will also be inherited. Of course you can also just forget about this, use plain ~/.bashrc and that path will be present in your xterms and such.

It just depends on what exactly do you want to do. Either way, it's a good idea to mark it to be exported so the rest of the programs can see the variable correctly.

Code:
export PATH="$PATH:/whatever/else"
To the original poster, this is a shell thing, not related to Fedora or any other distro. To get a complete list of the different rc files that a given shell uses you should look at its man page. For example, for bash you can find this info in the INVOCATION section of the bash man page.
 
  


Reply

Tags
fedora, setenv



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ifconfig command equivalent in Fedora acat800 Linux - Newbie 17 03-31-2008 08:22 PM
the equivalent of /etc/network/interfaces in Ubuntu on Fedora? ashlesha Linux - Networking 3 03-29-2007 12:39 PM
Fedora Core (URPMI equivalent?) webwolf70 Fedora 1 12-16-2004 06:13 PM
equivalent command in fedora pa_ash Linux - Newbie 1 06-28-2004 02:52 AM
equivalent command in fedora pa_ash Linux - Software 0 06-28-2004 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration