LinuxCommandLibrary

dbus-daemon

Manage inter-process communication via D-Bus

TLDR

Run the daemon with a configuration file

$ dbus-daemon --config-file [path/to/file]
copy

Run the daemon with the standard per-login-session message bus configuration
$ dbus-daemon --session
copy

Run the daemon with the standard systemwide message bus configuration
$ dbus-daemon --system
copy

Set the address to listen on and override the configuration value for it
$ dbus-daemon --address [address]
copy

Output the process ID to stdout
$ dbus-daemon --print-pid
copy

Force the message bus to write to the system log for messages
$ dbus-daemon --syslog
copy

SYNOPSIS

dbus-daemon [--session] [--system] [--config-file=FILE] [--address=ADDRESS] [options]

PARAMETERS

--session
    Run a message bus for the user session

--system
    Run the systemwide message bus (default)

--config-file=FILE
    Use specified configuration file

--address=ADDRESS
    Set bus address (e.g., unix:path=/tmp/foo)

--print-address[=FD]
    Print server address to stdout or FD and exit

--print-config
    Dump parsed configuration to stdout and exit

--fork
    Daemonize by forking into background (default)

--nofork
    Disable forking; run in foreground

--noserveracl
    Disable server-side ACL enforcement

--print-pid[=FD]
    Print daemon PID to stdout or FD and exit

--systemd-activation
    Enable systemd socket/service activation

--version
    Print version information and exit

--help
    Print usage summary and exit

DESCRIPTION

D-Bus is an inter-process communication (IPC) mechanism providing a message bus for applications to exchange structured messages. dbus-daemon is the core server implementing this bus, dispatching messages between processes efficiently. It supports two primary modes: the system bus (global, shared across users, often managed by init like systemd) and the session bus (per-user, started by login managers or dbus-launch).

The daemon reads XML configuration files defining policies, service activation, allowed addresses, and security rules like access control lists (ACLs). It handles name registration, service activation on-demand, and transports such as Unix sockets, abstract sockets, TCP, or console. Widely used in Linux desktops (GNOME, KDE), servers (systemd, PolicyKit), and embedded systems for hardware events, notifications, and device management.

dbus-daemon ensures low-latency communication without polling, using a peer-to-peer model over the bus. Security is critical: system bus runs privileged, enforcing strict policies to prevent unauthorized access.

CAVEATS

System bus requires root privileges; direct invocation rare—use init/systemd. Misconfigured policies risk security vulnerabilities. Avoid --noserveracl in production.

CONFIGURATION FILES

System: /usr/share/dbus-1/system.conf, /etc/dbus-1/system.d/
Session: /usr/share/dbus-1/session.conf, /etc/dbus-1/session.d/

DEFAULT ADDRESSES

System: unix:path=/run/dbus/system_bus_socket
Session: unix:tmpdir=/tmp (runtime dir)

HISTORY

Developed by Havoc Pennington in 2002 for GNOME as CORBA replacement. Evolved under freedesktop.org; major releases with D-Bus 1.0 (2004). Integrated into systemd (2010s) for activation.

SEE ALSO

Copied to clipboard