How to set environment variables for X session? [Was Re: Any idea why starting evolution...]

Chris G cl at isbd.net
Mon Oct 25 12:21:24 CEST 2010


On Sun, Oct 24, 2010 at 06:53:55PM +0200, Yves-Alexis Perez wrote:
> On dim., 2010-10-24 at 16:28 +0100, Chris G wrote:
> > I've played some more, .xsessionrc *is* executed but environment
> > variables
> > set in .xsessionrc don't get out to the X session.  Presumably
> > .xsessionrc must be being run in a child process somewhere on the way
> > in
> > and thus variables set there are lost.  I tried simply the following
> > in
> > my .xsessionrc :-
> > 
> >     echo ".xsessionrc starting" >/home/chris/tmp/xsession.log
> >     export MYENVVAR="ABCDEFG"
> >     echo ".xsessionrc ending" >>/home/chris/tmp/xsession.log
> > 
> > and I got the messages in /home/chris/tmp/xsession.log but MYENVVAR
> > wasn't set. 
> 
> It does work fine here. Check something isn't cleaning up the
> environment you're checking from.
> 
Yes, I really don't understand what's going one as regards things set in
.xsessionrc, however I've found that simply putting the
gnome-keyring-daemon stuff in my .profile works OK.  As it's not X
dependent (and is actually something useful in a text only environment,
as when I'm running without X) that's actually quite a sensible solution
for me.



-- 
Chris Green



More information about the Xfce mailing list