I have this in /etc/profile in Fedora 17:
PATH=$PATH:"/usr/pgsql-9.2/bin"
EDITOR="/usr/bin/emacs -nw"
PSQL_EDITOR="/usr/bin/emacs"
PAGER="/usr/bin/less"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL EDITOR PSQL_EDITOR PAGER
The $PATH variable concatenation is in effect when I login as root or as postgres but not when I login to my account. I'm using terminator.
As root:
# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/pgsql-9.2/bin:/root/bin
As postgres:
$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/pgsql-9.2/bin:/usr/pgsql-9.2/bin
In my account:
$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/cpn/.local/bin:/home/cpn/bin
Notice the absence of the /usr/pgsql-9.2/bin path.
/home/cpn/.bash_profile has this line:
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
When I su - (notice the -) to my account the path is there so I guess it is a matter of login vs not login shell.
How to make the terminal to always open a login shell?
/etc/profile. How do you log in? If you use a graphical display manager (a program where you type your password in graphics mode), which one (e.g. gdm, kdm, lightdm, …)? – Gilles 'SO- stop being evil' Oct 08 '12 at 23:46. /etc/profileas the first line of your.bash_profile? – Karlson Oct 09 '12 at 13:33