mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
3df49c2877
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_systemd. 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>
8 lines
198 B
Bash
Executable File
8 lines
198 B
Bash
Executable File
#!/bin/sh
|
|
|
|
systemctl --user import-environment DISPLAY XAUTHORITY
|
|
|
|
if which dbus-update-activation-environment >/dev/null 2>&1; then
|
|
dbus-update-activation-environment DISPLAY XAUTHORITY
|
|
fi
|