Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
newbie question regarding PATH environment variable [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
dmoser
n00b
n00b


Joined: 21 Feb 2006
Posts: 5

PostPosted: Tue Mar 07, 2006 10:54 pm    Post subject: newbie question regarding PATH environment variable [SOLVED] Reply with quote

How/where does the PATH environment variable get set for root and for non-root accounts?

Last edited by dmoser on Wed Mar 08, 2006 4:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Mar 07, 2006 11:00 pm    Post subject: Reply with quote

The PATH variable is set up in /etc/profile

When you're looking at a login prompt, whether from X or from a TTY, the console is owned by root. After the authentication happens, the console ownership is changed to the new user and the user's environment is set up, including starting a shell of your choice and maybe a window manager. When the last process exits, the ownership of the console reverts back to root and the environment is cleared.

The shell-specific configuration happens in other files. For bash, there's one in /etc/bash/bashrc and in ~/.bash_profile, ~/.bashrc. Other shells use other configuration files. You can run "man <shell>" where <shell> is the one you are using to get the shell-specific configurations.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Mar 07, 2006 11:03 pm    Post subject: Reply with quote

type "man boot" to get more specific information. You can actually change the boot process to fit your own needs, but if you're asking about where the PATH is defined you should stay out of that for a little while. Unless you don't mind reinstalling a few times...
Back to top
View user's profile Send private message
widu
Guru
Guru


Joined: 05 Jun 2004
Posts: 333
Location: Freiburg

PostPosted: Tue Mar 07, 2006 11:11 pm    Post subject: Reply with quote

1clue wrote:
type "man boot" to get more specific information. You can actually change the boot process to fit your own needs, but if you're asking about where the PATH is defined you should stay out of that for a little while. Unless you don't mind reinstalling a few times...

eh? well you should not play around with the $PATH for root, but changing it for normal users wan't bork your system,or am I wrong? It comes in very handy to just add directories for your own scripts or programms to your path variable.
ps:
I can't find path or PATH in the boot man page at all.
_________________
nature is a heterosexual fiction
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Mar 07, 2006 11:22 pm    Post subject: Reply with quote

widu,

Not talking about the PATH. I'm talking about changing the system boot process.

The PATH is not addressed directly in the "man boot" page. The things that happen during the boot process are addressed, which includes login mechanics. Essentially, the boot man page covers everything up to but not including the login.

Maybe I'm jumping the gun here. Generally it seems that people who want to know where the PATH is set have some level of curiosity about the boot process.
Back to top
View user's profile Send private message
widu
Guru
Guru


Joined: 05 Jun 2004
Posts: 333
Location: Freiburg

PostPosted: Tue Mar 07, 2006 11:32 pm    Post subject: Reply with quote

1clue wrote:
widu,

Not talking about the PATH. I'm talking about changing the system boot process.

The PATH is not addressed directly in the "man boot" page. The things that happen during the boot process are addressed, which includes login mechanics. Essentially, the boot man page covers everything up to but not including the login.

Maybe I'm jumping the gun here. Generally it seems that people who want to know where the PATH is set have some level of curiosity about the boot process.

thanks for clearing that.
_________________
nature is a heterosexual fiction
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum