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 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 || dbus-broker

To enable dbus-broker as the system bus, first disable dbus.service and then enable dbus-broker.service

To enable as a user bus, a dbus-broker.service user unit can be enabled either for a single user, or globally for all users.

Reboot for these settings to take effect.

Note: dbus-broker currently does not have AppArmor support

Tips and tricks

Override dbus service

You can override dbus services in $XDG_DATA_HOME/dbus-1/services.

If the service is already launched, the override will not work. We must kill the existing service's process, or launch our service earlier.

You can use this to always use a particular service when you have several installed providing the same well-known bus name.

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

You can also use busctl(1) from systemd.

gollark: <#800374599945551892> is <#800374599945551892> you.
gollark: Not as planned.
gollark: <@398575402865393665> is like bee.
gollark: ++magic reload_ext discord_link
gollark: <#800374545608867860> is bee.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.