[svlug] Adding environment variable to a shell and it's

Robert Hajime Lanning lanning at lanning.cc
Fri May 30 17:19:01 PDT 2003

<quote who="Roland Krause">
> Ian,
> thanks for the advice. Unfortunately I cant/"dont want to" change the
> program that gets started. Seems therefore the wrapper script is the
> only way of dealing with the situation. I have this implemented and it
> works fine. Should be the same in KDE and Gnome, a shell wrapper is a
> shell wrapper after all.
> Under the "evil" OS there is a way to set environment variables. In the
> worst case one has to relogin to make them active. Something like that
> was what I was looking for.
> I am going to keep looking :-)

Wait, are you wanting to have an environment variable set, every time
you login, that is availble to the whole GUI?

If that is true, then I think it depends on your distrobution.

I run Slackware 9.0.  Under this distrobution, the script that starts
my X session is /etc/X11/xdm/Xsession.  Inside this, I found that it
looks for $HOME/.xprofile (instead of $HOME/.profile) and sources it.
So, I made a symlink from .xprofile to .profile, so my environment is
preset for everything I launch.

Now, I believe this is a per distrobution, because, in the previous
versions of Slackware, it looked for $HOME/.profile.  Though it could
be just an update from the xdm maintainer.


More information about the svlug mailing list