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

Re: How to add a new dir to my PATH?



On Mon, Feb 06, 2006 at 01:40:53PM -0200, Bruno Buys wrote:
> Apparently the issue is solved, so thanks for everybody's inputs. But it 
> looks weird, to me. How come there's .bash_profile and .bashrc on my 
> home, that aren't read when the systems loads right to X? Or, I can't 
> set my env, when in X by any other means...

Because X isn't bash, or any other Bourne shell.  So why in the world would
it source Bourne-style rc files?  *Bash* will read one or the other, or
both, depending on the conditions laid out in the INVOCATION section of the
man page... but not until you actually *run* a copy of bash.

If you want environment variables set for your X session, then set them in
your ~/.xsession file.  That will work, unless you use gdm/kdm, which
ignore established standards (after all, they're Gnome and KDE) and
implement their own, separate X startup that only root can modify.

No doubt one of the umpteen idiots who think the X startup should source
the user's bash configuration will chime in at this point.  Ask them the
same thing they get asked every time... what if the user doesn't use bash?
Even if he does use a Bourne shell, how are you going to deal with the
difference between a login shell, and a non-login shell, having different
configurations?

Their answer usually involves the user becoming root and messing with the X
configuration.  Well, if the user can't control it, you've already lost.
That's one of the reasons why gdm and kdm are so deeply flawed.

-- 
 Marc Wilson |     I've given up reading books; I find it takes my mind
 msw@cox.net |     off myself.



Reply to: