Bugzilla – Bug 1108549
startx unsets DBUS_SESSION_BUS_ADDRESS, which breaks user dbus session launched by systemd
Last modified: 2019-01-13 22:55:51 UTC
startx unsets DBUS_SESSION_BUS_ADDRESS environment variable, which makes gnome-session (and probably other DEs or programs, except of Plasma) launch a new D-Bus session, while systemd has already launched its own. It breaks user systemd services that use D-Bus (e.g. PulseAudio), because X uses another D-Bus session.
Debian fixed this by providing /etc/X11/Xsession.d/20dbus_xdg-runtime (https://sources.debian.org/src/dbus/1.12.10-1/debian/20dbus_xdg-runtime) script that restores DBUS_SESSION_BUS_ADDRESS, and Arch Linux devs just patched startx to not unset it (https://git.archlinux.org/svntogit/packages.git/tree/trunk/fs46369.patch?h=packages/xorg-xinit).
Does it work to put
below /etc/X11/xinit/xinitrc.d? It must be made executable.
Yes, but it also needed to put "#to be sourced" at the beginning. Although I think that patching startx to remove one line is easier than adding xinitrc.d script. BTW, upstream bug is https://gitlab.freedesktop.org/xorg/app/xinit/issues/9.
You're right. This file would need to be sourced instead of being executed. And it would be much easier to just patch startx script.
Did I mention that we no longer support startx since decades? ;-)
Anyway, added Arch Linux patch ...
This is an autogenerated message for OBS integration:
This bug (1108549) was mentioned in
https://build.opensuse.org/request/show/635868 Factory / xinit