What about ability to specify a way of service/application activation by dbus?

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Mar 4 04:19:33 PST 2013


On 02/03/13 11:00, Nikita Zlobin wrote:
> There is one nice audio session manager, implemented as dbus service,
> which starts another applications just by forking. This makes it more
> like a desktop application, but its dbus nature brings one serious
> trouble: when its daemon is started by dbus, it loses environment
> variables, defined by desktop, which under kde are available for
> anything, started by kde.

Under, for instance, Debian, any particularly "important" environment
variables are meant to be set by files in /etc/X11/Xsession.d/ before
the dbus-daemon starts, so they're available for its child processes.

It is possible for a session manager to manipulate the environment that
the dbus-daemon passes to its children by calling its
UpdateActivationEnvironment method: for instance, gnome-session does
that. Perhaps the equivalent "big parent process" of KDE (startkde?
sorry, it's ages since I used KDE) should do the same?

There is infrastructure within dbus-daemon to make service activation
use a parent systemd process, although it was originally designed for
the system bus. Using it for the session bus is somewhere between
"doesn't work" and "very much unfinished", and needs some design work,
mainly on the systemd side (see
<https://bugs.freedesktop.org/show_bug.cgi?id=61129> and the bugs and
mailing list thread that it references).

    S


More information about the dbus mailing list