[systemd-devel] Systemd socket activation of DBus in the user session

Kok, Auke-jan H auke-jan.h.kok at intel.com
Mon Jun 18 09:11:12 PDT 2012


On Mon, Jun 18, 2012 at 2:35 PM, Peeters Simon <peeters.simon at gmail.com> wrote:
> 2012/6/18 Léo Gillot-Lamure <leo.gillot at navaati.net>:
>> Hello.
>>
>> I'm trying to get systemd work as the user session supervisor, thus i
>> want it to launch the dbus daemon for the session. Systemd seems to
>> require that dbus is socket activated (service units of Type=dbus have a
>> Require dep on dbus.socket, not on dbus.service), so i created the
>> relevant .socket and .service unit files. Taking inspiration from the
>> unit files at the system level, i put "/usr/bin/dbus-daemon --session
>> --address=systemd: --nofork --systemd-activation" as the ExecStart
>> command line for the daemon. The session boots up, the dbus daemon is
>> launched by the socket activation, the gnome panel is properly launched
>> (trough a unit file) and registers to the bus, messages on the bus are
>> correctly passed, everything seems fine.
>> Except the bus-activation of services. For example launching
>> gnome-terminal doesn't work because it tries to launch something (can't
>> remember what, maybe it was gconf, or some gvfs stuff) using the bus and
>> it fails. The result is exactly the same when not using the
>> --systemd-activation flag. This message
>> http://lists.freedesktop.org/archives/systemd-devel/2012-May/005301.html
>> says that it's a dbus bug, because the daemon launches bus-activated
>> processes with DBUS_SESSION_BUS_ADDRESS==systemd:,guid=<hash> which is
>> broken.
>>
>> Thus arise two questions :
>> - Auke, considering this problem how did you manage to get the
>> session-wide DBus work in your Meego systemd --user experiment ?
>> - Dear DBus folks, could this bug be fixed ? Maybe there are already
>> patches around fixing it ? I could not see any mention of it on the
>> mailing list.
>
> link to the bug (and patch) is
> https://bugs.freedesktop.org/show_bug.cgi?id=50962
>
> the last version of the patch is functionnally correct, but i still
> have to clean up some things (or maybe somebody else can) before it
> can get in, unfortunatly i am now studying for my exams, so a next
> patch will take at least another week.
>
> also i have been running the patch succesfully (both in system mode
> and in my systemd-gnome-session (which i will share soon)) for a while
> now (read: since last week) without any problem.

ah nice! is that on systemd HEAD? Love to see the code :^)

Auke


More information about the systemd-devel mailing list