environment of activated services

Dan Winship danw at gnome.org
Thu May 8 09:48:24 PDT 2008


Colin Walters wrote:
> On Thu, May 8, 2008 at 9:56 AM, Matthias Clasen
> <matthias.clasen at gmail.com> wrote:
>> Some cube discussion made it clear that I am a bit confused here.
>> At least for SESSION_MANAGER, the problem here is that the session bus
>> is not actually running inside the session, so the daemon doesn't have
>> that variable in its environment either. Whats really needed here is
>> some way to selectively pull some parts of the callers environment
>> into the environment of the activated service.
> 
> I think it might be easier to have gnome-session, immediately after
> being launched, inject the crucial environment variables into the
> session bus.  Say org.freedesktop.DBus.SetEnvironment(a{ss})

Yeah. The new gnome-session already has
org.gnome.SessionManager.SetEnv(ss) to solve that problem with its own
children.

But really, the only good solution is to stop using environment
variables to find services. Eg, in 2.24, gnome-screensaver will be able
to use D-Bus to tell gnome-session to logout, so it won't matter whether
or not it can see $SESSION_MANAGER.

-- Dan


More information about the dbus mailing list