Environment vars - where to set?

Martin Maney ubuntu at two14.net
Wed Oct 13 19:09:21 UTC 2004


On Sat, Oct 09, 2004 at 04:05:14PM +0100, Andy wrote:
> .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.

Two things.  .bashrc doesn't get run as part of bash's startup for
login shells, though it is quite often sourced from .bash_profile,
giving the same effect.  (In a recently-installed machine (10/11 daily
.CD, I think), bash_profile sources .bashrc by default.)

The other thing is that I came across what appeared to be an option
that addresses this directly.  Hmmm.  There it is, in the registry\\\\\
gconf editor / apps / gnome-terminal / profiles / Default /
login_shell, a checkbox item described as "whether to launch the
command ... as a login shell".

<sounds of testing>

Seems to work.

-- 
We've all heard that a million monkeys banging on
a million typewriters will eventually reproduce
the entire works of Shakespeare.  Now, thanks to the
Internet, we know this is not true.  -- Robert Wilensky





More information about the ubuntu-users mailing list