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

Kok, Auke-jan H auke-jan.h.kok at intel.com
Sun Jun 17 17:29:21 PDT 2012


On Sun, Jun 17, 2012 at 11:45 PM, Léo Gillot-Lamure
<leo.gillot at navaati.net> wrote:
> 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 ?

well, it's now Tizen, and the issue is technically still open.

> - 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.

there's a patch in dbus bugzilla, which I havent't tested yet, but it seems
to do the right thing. The patch was mentioned in the thread on this list here.

I'm still on systemd-43/44 for most of my systems, since 185 introduces some
problematic changes for the user session. I don't have the time for the next
week or so to look into the tip, unfortunately, but after that it'll have
my priority.

Auke


More information about the systemd-devel mailing list