~craftyguy/superd#8: 
support starting dbus and services that use dbus

dbus-daemon has an --address parameter where a known address could be given, e.g.:

dbus-daemon --nofork --address "unix:abstract=$XDG_RUNTIME_DIR/dbus"  --config-file=/usr/share/defaults/at-spi2/accessibility.conf

and DBUS_SESSION_BUS_ADDRESS could be set to it in the env. for services that need a connection to the dbus session. but how to set the env. variable? I don't really want to have special code just for managing dbus like this...

Status
REPORTED
Submitter
~craftyguy
Assigned to
No-one
Submitted
6 months ago
Updated
6 months ago
Labels
enhancement

~craftyguy 6 months ago

an example of a service file for dbus that uses a consistent address location:

[Unit]
Description=DBus user session service

[Service]
Type=simple
ExecStart=dbus-daemon --nofork --address unix:path=$XDG_RUNTIME_DIR/dbus.sock --session
Restart=always
RestartSec=1

Then you might do something like:

$ superctl set-env DBUS_SESSION_ADDRESS="unix:abstract=$XDG_RUNTIME_DIR/dbus.sock"

and restart the services that need dbus after that service starts... but that's not ideal for obvious reasons

Register here or Log in to comment, or comment via email.