From Gentoo Wiki
Jump to: navigation, search
External resources

D-Bus is an inter-process communication (IPC) system for software applications to communicate with one another.


Portage knows the global USE flag dbus for enabling support for D-Bus in other packages. Enabling this USE flag will pull in sys-apps/dbus automatically (default for desktop profiles):


USE="... dbus ..."

The USE flags of dbus are:

→ Information about USE flags
USE flag Default Recommended Description
X Yes Adds support for X11
debug No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
doc No Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
selinux No  !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
static-libs No Build static libraries
systemd No Build with sys-apps/systemd at_console support
test No Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore

After setting this you want to update your system so the changes take effect:

root # emerge --ask --changed-use --deep @world


The main config files are the /etc/dbus-1/system.conf for the system bus and session.conf for the session bus.


You can now start D-Bus:

root # /etc/init.d/dbus start

To start D-Bus at boot time, add it your default runlevel (although it often also get started by D-Bus depending services):

root # rc-update add dbus default


Some useful commands are:

  • dbus-monitor --system - To monitor the activities in the system bus.
  • dbus-monitor --session - To monitor the activities in the session bus.
  • dbus-send PARAMETER - To send a message. See the dbus-send man page for more information.


With dbus-monitor you can monitor the buses. Error are also redirected to Syslog (/var/log/messages).