Closed royeom closed 7 months ago
The github-wiki contains information on this: https://github.com/bus1/dbus-broker/wiki#using-dbus-broker
You can find the service-files for dbus-broker in the repository, and they are usually installed alongside dbus-broker on your system.
There is a common usage for user bus on the github-wiki. :( I need to use specific socket ( '/var/run/dbus/my_session_bus_socket' ).
Could you suggest how to use specific socket path with session bus?
dbus-broker-launch
requires to be socket-activated. The unit shipped with the launcher has an entry [Install] Alias=dbus.service
, meaning it will be operating as dbus.service
, rather than dbus-broker.service
when enabled.
This automatically pulls in dbus.socket
, which is provided by your distribution. This socket unit provides the socket to dbus-broker
(using the standard location for the user bus).
If you want to use a different socket path, copy dbus.socket
to my-dbus.socket
and dbus-broker.service
to my-dbus.service
, adjust the socket path accordingly and start the units.
Please refer to the systemd manuals for details on how service and socket units operate. dbus-broker-launch
uses the standard system service and socket units without any special handling.
I will close this as resolved. Let me know if there are still open questions, or re-open the issue instead! Thanks!
Below is my service file to launch session bus with dbus-daemon. I wanna replace ExecStart with dbus-broker or dbus-broker-launch.
... [Service] Slice=my-active.slice Group=CustomGroup ExecStart=/usr/bin/dbus-daemon --session --nofork --address=unix:path=/var/run/dbus/my_session_bus_socket ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig Nice=-19 ...
I tried like this. But it doesn't work..
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/my_session_bus_socket"
ExecStart=/usr/bin/dbus-broker-launch --scope user --audit
Could anyone let me know? :)