Environment vars - where to set?
Andy
ubuntu at arda.demon.co.uk
Sat Oct 9 15:05:14 UTC 2004
Darren Wheatley wrote:
>>~/.bashrc is probably better, especially if you uncomment the bit in
>>~/.bash_profile that sources ~/.bashrc.
>
>
> Do these get called in Ubuntu though? I thought from other posts that these
> files weren't called when you logged in / started a shell.
.bash_profile doesn't when you open a terminal within Gnome (it does if
you log in via a console). .bashrc will run either way - but be called
every time you open a new shell, not just once - so things you only want
to happen once shouldn't go here.
I started a thread on this a while ago as some distros do run
.bash_profile when doing a graphical login, but there didn't seem to be
a consensus on the right approach.
What I did in the end (a little messy but it works) is call another
script from both .bash_profile and .gnomerc which sets up things I
always want run (including my path).
HTH
Andy
More information about the ubuntu-users
mailing list