LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   $PATH /etc/profile question (https://www.linuxquestions.org/questions/debian-26/%24path-etc-profile-question-566065/)

ewlabonte 07-02-2007 11:04 AM

$PATH /etc/profile question
 
This is a kind of stupid question. It's just curiosity. I know that the default path for users is stored in /etc/profile. I did a minimalist install so my /etc/profile just includes:

/usr/local/bin:/usr/bin:/bin:/usr/games

I was of the opinion that other additions to the path would be included in ~/.bash_profile. But when I type

echo $PATH

I get:

/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

and there is no mention of /usr/bin/X11 in either /etc/profile or ~/.bash_profile.

So my question is how did /usr/bin/X11 get added to $PATH ?

Daws 07-02-2007 12:37 PM

Maybe by /etc/login.defs which is used by su among other things.

Check /etc/login.defs for the ENV_PATH and ENV_SUPATH variables.
If that's not it then I dunno.

Daws 07-02-2007 12:39 PM

Oh yeah forgot, are you using X? If you are which login manager are you using, Xdm, Gdm, Kdm etc. These programs can also set $PATH

ewlabonte 07-03-2007 08:51 AM

Quote:

Originally Posted by Daws
Maybe by /etc/login.defs which is used by su among other things.

Check /etc/login.defs for the ENV_PATH and ENV_SUPATH variables.
If that's not it then I dunno.

Thanks, that was it. They both include it. The ENV_PATH variable is set to exactly what I get with echo $PATH. Like I said, it was just curiosity, but thanks for the help :-)

indienick 07-03-2007 09:07 AM

Did you try checking ~/.bashrc for that $PATH declaration? :)

nx5000 07-03-2007 10:18 AM

Yes probably it's gdm that is setting this.
This /usr/bin/X11 does not exist anymore on etch

Daws 07-03-2007 11:57 AM

It still exists as a link to /usr/bin for compatibility reasons.

masinick 07-03-2007 02:57 PM

http://www.troubleshooters.com/linux/prepostpath.htm has a nice discussion about the use of $PATH from Bash and where the path environment is typically set. That said, it is most certainly either the window manager or the desktop environment that is setting the additional directory in your environment path.


All times are GMT -5. The time now is 06:37 PM.