void-linux / void-docs

mdbook source for docs.voidlinux.org
https://docs.voidlinux.org
Creative Commons Attribution Share Alike 4.0 International
165 stars 183 forks source link

user-services.md: add session dbus and ssh example #785

Closed tjheeta closed 7 months ago

tjheeta commented 11 months ago

Added examples for setting up a session dbus and ssh-agent via user-services. References to setting up a session dbus were made in pipewire.md and session-management.md .

tjheeta commented 11 months ago

I spent a few hours struggling with dbus until someone explained in irc how dbus was supposed to work. For instance, I was launching applications with dbus-launch and dbus-run-session to get them to connect to user dbus.

With that in mind, I was considering adding the following blurb to session-management.md:

... in Linux. D-Bus can provide a system bus and/or a session bus, the latter being specific to a user session.

The system bus is provided by /etc/sv/dbus and listens on /run/dbus/system_bus_socket. The session bus does not have a set location, but provides DBUS_SESSION_BUS_ADDRESS for any applications to find the listening socket. Note that for the session dbus to work as designed there can only be one instance per user account and DBUS_SESSION_BUS_ADDRESS must be in the environment of all dbus-using programs of that user pointing to the listening socket.

To provide ...

Not sure if this belongs in a different PR or not.