Difference between revisions of "D-Bus"

From ArchWiki
Jump to navigation Jump to search
(Debugging: Add QDbusViewer to list of D-Bus debugging applications.)
(Added basic instructions on using dbus-broker as a replacement)
 
Line 10: Line 10:
  
 
{{Pkg|dbus}} is pulled and installed as a dependency of {{Pkg|systemd}} and user session bus is [https://www.archlinux.org/news/d-bus-now-launches-user-buses/ started automatically] for each user.
 
{{Pkg|dbus}} is pulled and installed as a dependency of {{Pkg|systemd}} and user session bus is [https://www.archlinux.org/news/d-bus-now-launches-user-buses/ started automatically] for each user.
 +
 +
== Alternative Implementations ==
 +
=== dbus-broker ===
 +
{{Pkg|dbus-broker}} is a drop-in replacement for the libdbus reference implementation, which aims "to provide high performance and reliability, while keeping compatibility to the D-Bus reference implementation". [https://github.com/bus1/dbus-broker]
 +
 +
To enable dbus-broker as the system bus:
 +
 +
# systemctl enable dbus-broker.service
 +
 +
To enable as a user bus, run as the desired user:
 +
 +
$ systemctl --user enable dbus-broker.service
 +
 +
Or, to enable for all users, run as root:
 +
 +
# systemctl --global enable dbus-broker.service
 +
 +
Reboot for these settings to take effect.
  
 
== Debugging ==
 
== Debugging ==

Latest revision as of 18:04, 18 March 2019

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Mention disabling of dbus services through use of systemctl mask and overrides in /etc/dbus-1/services (Discuss in Talk:D-Bus#)

D-Bus is a message bus system that provides an easy way for inter-process communication. It consists of a daemon, which can be run both system-wide and for each user session, and a set of libraries to allow applications to use D-Bus.

dbus is pulled and installed as a dependency of systemd and user session bus is started automatically for each user.

Alternative Implementations

dbus-broker

dbus-broker is a drop-in replacement for the libdbus reference implementation, which aims "to provide high performance and reliability, while keeping compatibility to the D-Bus reference implementation". [1]

To enable dbus-broker as the system bus:

# systemctl enable dbus-broker.service

To enable as a user bus, run as the desired user:

$ systemctl --user enable dbus-broker.service

Or, to enable for all users, run as root:

# systemctl --global enable dbus-broker.service

Reboot for these settings to take effect.

Debugging

  • D-Feet — Easy to use D-Bus debugger GUI tool. D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces.
https://wiki.gnome.org/Apps/DFeet || d-feet
  • QDbusViewer — GUI D-Bus debugger. Can be used to inspect D-Bus services and invoke methods on them.
https://doc.qt.io/qt-5/qdbusviewer.html || qt5-tools

See also