Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: A bit of Linux advice yet again??
>>>>> "Norman" == Norman Dunbar <Norman.Dunbar_at_lfs.co.uk> writes:
Norman> Hi Tim, I'm not 100% sure, but isn't /etc/profile always run Norman> as it sets up stuff you (the sys admin) want setting up for Norman> all users, and then it looks for the others. It certainly Norman> does on my HP servers - /etc/profile then $HOME/.profile Norman> where $HOME is appropriate to the user logging in - obviously Norman> !
Norman> /etc/profile ~/.bash_profile ~/.bash_login ~/.profile
Norman> BUT it only looks for these files iff it is a login Norman> shell. Under X, unless your .xsession has the --login option Norman> set, all terminals (xterms et. al.) you open are opened as Norman> just a sub-shell of your X session and therefore not as a Norman> login shell (as you are already logged in).
/etc/profile is always run for login shells - I don't think it is run for non-login shells, but all non-login shells are usually a sub-shell of a login shell somewhere in the chain. However, I would have to check the bash man page to be sure on that. I am certain the $HOME/.bash_profile et. al. are only checked for login shells and it stops after the first match it finds e.g. if you have both .bash_profile and .profile in your home dir, the .profile will never get sourced because it will stop after reading .bash_profile.
Personally, I make a symlink from .bash_profile to .profile and then forget about which one it is meant to be :-)
Tim
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!Received on Mon Feb 03 2003 - 15:42:21 CST
![]() |
![]() |