[sclug] puzzle: including ~/bin in $PATH

Roland Turner SCLUG raz.fpyht.bet.hx at raz.cx
Mon Nov 28 10:36:16 UTC 2005


On Mon, 2005-11-28 at 09:57 +0000, John Stumbles wrote:

> If I log in on a tty it works OK ($PATH is set properly).
> 
> It's only when I log in under kdm and start a kde session that it's not.
> 
> So  kde evidently does something different, but what?

Umm, it sounds like you've not understood what ~/.bash_profile etc. are
for. They are only run by login shells (argv[0][0] == '-', or
'-l'|'--login' has been passed as an argument). A shell run
from /bin/login is a login shell. A shell launched within an X session
is not. Your X session itself is _not_ run as a child of a login shell;
it is run _in_place_of_ a login shell.

What you are after is .bashrc.

Alternately, if you really are looking to set environment variables for
your entire session (i.e. so they can be seen by applications that are
children of the session manager but that are not launched from an
interactive shell), you will need to work out how to do that for your
session manager. I don't know enough about KDE to know how to do this.

- Raz



More information about the Sclug mailing list