Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Support user buses? software like mako and anbox use them #87
Oct 21, 2018
The user buses you can see in the source are present if a user instance of systemd is started.
elogind can not support dbus user buses, because they require systemd to run the system. Which defeats the purpose of elogind as a systemd-login drop-in replacement.
However, if at least one other init system allows to spawn itself under a users authority, there might be a point. Or, if there is purpose in users starting dbus all by themselves. Although I do not know why someone would like to start an application that is cut off from the system like this. To me it sounds like crippling the purpose of dbus itself.
Or maybe I do not know enough about this particular use case... Why does software like the ones you mentioned need that?
The software typically connects to the user bus you mentioned. But in the absence of systemd and the user bus it starts, I understand that it will connect to the session bus -- something that is commonly found on non systemd login sessions. There will have to be a mechanism for the session bus to start, but such mechanisms do exist. They include Xsession dropins, xdg autostart files, or session process managers like gnome session, kautostart, and upstart.
The session bus is used for instance by notification daemons. logind doesn't need to care about starting the session bus -- this isn't its job. Instead, the dbus session bus can be started e.g. with the compositor/window manager.
Some applications link with
Yes, but if a user bus is started, no matter how, and there is software that uses/needs that, supporting it would be logical.
PR #89 doesn't make it look overly complicated, so I think we can do this.
The logical consequence is to add support the requested support.
P.S Sorry for not spotting this earlier.
Your recap is correct. I would only specify that from the perspective of sd-bus, a user bus and a session bus are nearly indistinguishable. They are both unprivileged, and their address is specified in the environment variable
added a commit
Oct 24, 2018
If I understand Lennarts commit message correctly, we can simply drop it and be done with it? Cool!
Re-Opening as a reminder to cherry-pick that!