Generated by GPT-5-mini| DBus | |
|---|---|
| Name | D-Bus |
| Title | D-Bus |
| Developer | freedesktop.org |
| Operating system | Unix-like, Linux, BSD, macOS, Windows (port) |
| License | LGPL |
| Website | freedesktop.org/wiki/Software/dbus |
DBus is an inter-process communication (IPC) system that provides a message bus for software components to communicate on Unix-like systems. It enables coordination between system services, desktop environments, and applications, facilitating event notification, method invocation, and service discovery. DBus is widely used across Linux distributions, desktop environments, hardware daemons, and embedded systems.
DBus was designed at freedesktop.org to unify earlier IPC mechanisms used by KDE, GNOME, and other desktop environments. It operates alongside other IPCs such as CORBA, DCOP, X11, Wayland, PulseAudio and systemd services, and complements frameworks like Qt and GTK+. Major adopters include distributions such as Debian, Ubuntu, Fedora, Arch Linux, openSUSE and projects like KDE Plasma, GNOME Shell, Xfce, LXDE and MATE. DBus interacts with system components like NetworkManager, BlueZ, udisks2, upower, systemd-logind and avahi-daemon.
The DBus architecture centers on a central message bus daemon that brokers communication between clients, analogous to architectures used by D-Bus peers in desktop stacks. Two primary buses exist: a per-session bus used by desktop components such as gnome-session, plasmashell, nautilus, konqueror and a system bus for system services like udev, systemd, Polkit and NetworkManager. Clients like Firefox, Chromium, LibreOffice, GIMP, Inkscape, Pidgin and Transmission connect over sockets provided by the bus daemon. Language bindings for environments like Python, Perl, Java, C++,[ [C#, Go, Rust and JavaScript enable integration with frameworks such as Electron, Mono, GTK+, Qt5, Qt6 and EFL. The bus daemon enforces unique names, well-known names, and object paths, conceptually similar to SOAP and REST service naming, and integrates with service activation and address resolution used by systemd and inetd.
DBus defines a binary protocol for messages and a textual introspection format comparable to XML schemas and WSDL. Message types include method calls, method returns, errors, and signals—paralleling concepts in D-Bus-based APIs and in systems like AMQP and MQTT. The wire format supports basic types, arrays, structs, and dictionaries, akin to data models in JSON, Protobuf, Thrift and Avro. Introspection metadata allows tools such as d-feet, gdbus, qdbus, busctl and dbus-send to discover interfaces and methods, similar to service discovery in Zeroconf and DNS-SD provided by Avahi.
The reference implementation in C (libdbus) coexists with alternative implementations like GDBus (part of GLib), sd-bus (part of systemd), QtDBus (part of Qt), and third-party ports for Windows and macOS. Language bindings include python-dbus, PyGObject, node-dbus, dbus-java, dbus-sharp, rust-dbus, go-dbus, Haskell DBus and Perl D-Bus. Tooling and utilities are provided by projects such as dbus-devel, dbus-glib, dbus-python, dbus-broker and bus1 research projects. Major distributions package these implementations in repositories maintained by organizations like Canonical, Red Hat, SUSE, Debian Project and Arch Linux.
DBus security involves policy files, UID-based access control, and integration with authentication mechanisms like SELinux, AppArmor, Polkit and Linux Security Modules. The system bus commonly enforces policies configured in directories used by PolicyKit and distribution-specific defaults set by Ubuntu, Fedora Project and Debian Project. Transport-layer authentication can use EXTERNAL mechanisms and credentials verified against PAM modules and systemd seat/session management. Threat models for DBus consider privilege separation used in architectures like Chrome, Firefox, Flatpak sandboxing, Snapcraft confinement, and container runtimes such as Docker and Kubernetes; sandboxing solutions often mediate DBus access via portals like xdg-desktop-portal.
DBus is used for service lookup and signaling in scenarios involving NetworkManager network state changes, BlueZ Bluetooth events, udisks2 storage notifications, upower battery updates, power management via systemd-logind, and desktop session management with gnome-session and ksmserver. Application examples include multimedia routing in PulseAudio, screen locking with gnome-screensaver, printing via CUPS integrations, clipboard managers in Clipman, and remote control interfaces for mpv and vlc. Developer tools such as gdbus, qdbus, dbus-monitor and dbus-send illustrate common calls and signals; higher-level APIs are used in Electron apps, Flatpak portal implementations, and automation stacks involving Ansible or SaltStack.
DBus originated from collaborative efforts by developers from Red Hat, Ximian, Novell, Canonical and contributors to freedesktop.org to replace older IPCs like DCOP and disparate socket-based approaches. Its evolution intersected with projects such as GNOME, KDE, systemd, Wayland, PulseAudio and Avahi. Key maintainers over time have included engineers associated with Red Hat, Canonical and Intel; alternative designs and successors explored by academia and industry include bus1, ZeroMQ, gRPC and Wayland compositor messaging. Ongoing development occurs in repositories hosted by freedesktop.org and mirrored on platforms used by GitLab, GitHub and distribution maintainers; governance follows open-source practices embraced by communities like the Debian Project and Freedesktop contributors.
Category:Inter-process communication