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

Peeters Simon peeters.simon at gmail.com
Mon Jun 18 07:35:23 PDT 2012


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.


Simon


More information about the systemd-devel mailing list