[Pkg-utopia-maintainers] Bug#943917: 95dbus_update-activation-env in dbus-x11 overwrites systemd environment variables

Thomas Koch thomas at koch.ro
Thu Oct 31 20:23:54 GMT 2019


Package: dbus-x11
Version:  1.12.16-2

`man 5 environment.d` describes a mechanism to set environment variables for the global and user-session systemd instance.

However when dbus-x11 is installed, the user session environment defined in the above way is overwritten by /etc/X11/Xsession.d/95dbus_update-activation-env[1], more exactly by

dbus-update-activation-environment --verbose --systemd --all

The --systemd option triggers a call to the SetEnvironment method:
https://sources.debian.org/src/dbus/1.12.16-2/tools/dbus-update-activation-environment.c/#L244

"SetEnvironment() may be used to alter the environment block that is passed to all spawned processes. [...] Settings passed will override previously set variables."[2]

https://bugs.debian.org/833318 suggests that the --systemd option does not work anyways. If that is the case, then I propose to just remove it.

If that is not an possible, than I'm not sure what the solution is. Maybe it makes sense to go to the drawing board and check how environment variables are set right now in dbus, systemd and the session leader process and how we think it should be. - Any prior art here?

[1] https://sources.debian.org/src/dbus/1.12.16-2/debian/95dbus_update-activation-env
[2] https://www.freedesktop.org/wiki/Software/systemd/dbus#Manager-SetEnvironment

P.s.: My workspace policy enforces dbus-x11 and purges dbus-user-session. But even with dbus-x11, I consider it a bug if the documented mechanism to set the systemd environment does quietly fail.



More information about the Pkg-utopia-maintainers mailing list