Re: Inheriting shell environment



Dear Brian,

what would be so bad with supporting the .xsession mechanism? An individual executable script that can determine its interpreter with the hash bang mechanism. This does not rely on any support from your side. The only requirement was that the Xsession file that comes with gdm queried for the .xsession file and executed it if it existed. Otherwise the standard behaviour could take place.

--Folkert

On 02/14/05 18:58:53, Brian Cameron wrote:

Morten:

How do I get my shell environment variables exported to my X
environment when using gdm?

I thought the usual way would be to source the file containing
the environment variables from ~/.Xsession and then gdm would
read that file -- but it seems to have no effect?

I am using Ubuntu, btw.

I assume that you are asking how to set your default environment
variables when logging into gdm2.  Note that the script that starts
your session is the /usr/share/gdm/Xsession script.  Note that it
sources the following files:

/etc/profile
$HOME/.profile
/etc/xprofile
$HOME/.xprofile

So, if you set environment variables in any of the above files,
they will be set properly when you log in.

gdm2 is a little different than some other login programs in that
it does not support setting environment variables for your session
from shell-specific config files ($HOME/.bashrc, $HOME/.cshrc, etc.).
This is done because your login session isn't really a shell.  Each
shell is slightly different and making the login program support
them all (including the odd ones that some people insist on using)
is prone to bugs, problems, and not really maintainable.  gdm2
therefore only supports the $HOME/.profile mechanism for setting
environment variables only.

Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: gdm-unsubscribe sunsite dk
For additional commands, e-mail: gdm-help sunsite dk


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. 3166
--------------------------------------------------------------------------------



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