Package: dbus-x11 Version: 1.10.8-1 Severity: normal File: /etc/X11/Xsession.d/95dbus_update-activation-env
Dear Maintainer, `dbus-update-activation-environment --systemd` fails on systems without dbus-user-session package installed. This limits usefulness of `/etc/X11/Xsession.d/95dbus_update-activation-env` file and renders comment there misleading. * What led up to the situation? I was trying to understand why `systemctl --user show-environment` prints only very limited number of variables and why this happens: #v+ dbus-update-activation-environment --all --systemd dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 #v- * What exactly did you do (or not do) that was effective (or ineffective)? Comment in `/etc/X11/Xsession.d/95dbus_update-activation-env` says that Xsession environment variables will be put in "systemd --user, if running". Therefore, I expected all variables defined there to be available in systemd user services. Since they were not, I thought that maybe systemd --user starts only after dbus-launch, but that seems to not be a case: #v+ ps -o pid,user,args -C dbus-launch -C systemd PID USER COMMAND 1 root /sbin/init 4079 sddm /lib/systemd/systemd --user 4090 sddm dbus-launch --autolaunch 60bcc674655243c8a520cc5813fe7172 --binary-syntax --close-stderr 4138 minio /lib/systemd/systemd --user 4200 minio /usr/bin/dbus-launch --exit-with-session --sh-syntax #v- After some search, I finally looked up `dbus-update-activation-environment` source code. This error message comes from line 399, which handles return value of dbus call to `org.freedesktop.systemd1` service on connection defined as `dbus_bus_get (DBUS_BUS_SESSION, &error);`. I can only assume that tool is trying to talk to systemd on session bus. However, `org.freedesktop.systemd1` service is available only on system bus (and seems to refer to system's systemd, not user instance) - not on session bus. I can verify that by using `qdbusviewer` tool. After installing `dbus-user-session` package, I can find `org.freedesktop.systemd1` on session bus, `systemctl --user show-environment` prints many variables and `dbus-update-activation-environment --all --systemd` call does not print any error message. * What outcome did you expect instead? systemd --user instance to be populated with Xsession variables by default, OR `/etc/X11/Xsession.d/95dbus_update-activation-env` file not misleading me into thinking that systemd should have these variables defined. Rephrasing comment to say that only dbus environment is changed, and `dbus-user-session` must be installed for systemd --user instance, would be very much appreciated. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (400, 'unstable'), (102, 'experimental'), (10, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to pl_PL.UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dbus-x11 depends on: ii dbus 1.10.8-1 ii libc6 2.23-2 ii libdbus-1-3 1.10.8-1 ii libx11-6 2:1.6.3-1 dbus-x11 recommends no packages. dbus-x11 suggests no packages. -- no debconf information