[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Environment Variables



I'm trying to get a clear picture on how to set up the Environment Variables on my workstation.

Currently, I have something in my /etc/profile like this:

if [ "`id -u`" -eq 0 ]; then
PATH="$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
usr/bin/X11"
else
  PATH="$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi

Unfortunately, when I am in a term window and type 'echo $PATH'
I get:
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

Which is almost consistent with the second entry (I'm not root).
But I don't have the PATH variable defined...  No $HOME/bin/ directory

Now on another Debian box, I do have my /home/username/bin included in the $PATH, but I can't find anything that appears to be different in /etc/profile, ~/.bashrc, ~/.bash_profile


What's the right answer for allowing x-window login scripts (wdm, xdm, kdm) and xterm windows to have a consistent $PATH?



Reply to: