How to set environment early in X session startup?

Chris G cl at isbd.net
Sun Oct 24 13:15:06 UTC 2010


I have the following in my .xprofile to overcome a bug/issue in the
Gnome X startup process which doesn't initialise the
gnome-keyring-daemon properly:-

    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
    export GNOME_KEYRING_SOCKET

This works perfectly for ssh connections etc. but *doesn't* work for any
programs run from the menus because the environment for the menus is set
before .xprofile is run.  In particular it doesn't work if I run
evolution from the menu and so it takes a long time to start up while
waiting for (and failing to get) a connection to the gnome-keyring-daemon.

So I need to set the environment earlier in the X startup process, where
can I do this? I'd really like to do it by adding something to my $HOME
directory so that it won't get lost in upgrades.

-- 
Chris Green




More information about the ubuntu-users mailing list