chiark / gitweb /
login: support user-bus on dbus1
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 31 Aug 2015 16:07:46 +0000 (18:07 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:19:06 +0000 (10:19 +0100)
commitf22e355a0205dbe6f2d4bf66df5de5318390df66
treee2e86ef7f58ef92eee7a73851f8f8fd0a120a8b1
parente03beddd5e8800a82e8d8dc5a86fc1052a14bf5c
login: support user-bus on dbus1

dbus-1.10 was just released, including systemd units to run
`dbus-daemon --session` as systemd user unit. This allows using a
user-bus with dbus1, just like we do per default with kdbus.

All the dbus libraries have already been fixed long ago to use the
user-bus as default. Hence, there's no need to set
DBUS_SESSION_BUS_ADDRESS= if we use the user-bus. However, gdm and
friends continue to spawn a session bus if this variable is not set
(instead of checking for the existence of the user-bus). Hence, we force
the user-bus, if it is available, in pam_elogind. Once gdm and friends
are fixed, we can continue to drop this again. However, that might take
a while.

With this in place, all that is needed to make the user-bus work is:
    `systemctl --global enable dbus.socket`

If dbus.socket is not enabled, the legacy session-bus is still used.

Based on a patch by: Jan Alexander Steffens <jan.steffens@gmail.com>
src/login/pam_elogind.c