D-Bus (short for "Desktop Bus")
is a
message-oriented middleware
Message-oriented middleware (MOM) is software or hardware infrastructure supporting sending and receiving messages between distributed systems. Message-oriented middleware is in contrast to streaming-oriented middleware where data is communicate ...
mechanism that allows communication between multiple
processes running concurrently on the same machine. D-Bus was developed as part of the
freedesktop.org
freedesktop.org (fd.o), formerly X Desktop Group (XDG), is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operatin ...
project, initiated by
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
developer
Havoc Pennington
Robert Sanford Havoc Pennington (born c. 1976) is an American computer engineer and entrepreneur. He is known in the free software movement due to his work on HAL, GNOME, Metacity, GConf, and D-Bus.
History
Havoc Pennington graduated from ...
to standardize services provided by
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s such as
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
and
KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
.
The freedesktop.org project also developed a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
software library called libdbus, as a
reference implementation
In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation ...
of the specification. This library is not D-Bus itself, as other implementations of the D-Bus specification also exist, such as GDBus (GNOME), QtDBus (
Qt/KDE), dbus-java and sd-bus (part of
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
).
Overview
D-Bus is an
inter-process communication
In computer science, interprocess communication (IPC) is the sharing of data between running Process (computing), processes in a computer system. Mechanisms for IPC may be provided by an operating system. Applications which use IPC are often cat ...
(IPC) mechanism initially designed to replace the
software component
A software component is a modular unit of software that encapsulates specific functionality. The desired characteristics of a component are reusability and maintainability.
Value
Components allow software development to assemble software ...
communications systems
CORBA
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sy ...
and
DCOP, used by the
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
and
KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
Linux
desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
s respectively. The components of these desktop environments are normally distributed in many processes, each providing only one or a few ''services''. These services may be used by regular client
applications
Application may refer to:
Mathematics and computing
* Application software, computer software designed to help the user to perform specific tasks
** Application layer, an abstraction layer that specifies protocols and interface methods used in a ...
or by other components of the desktop environment to perform their tasks.
D-Bus provides a
software-bus abstraction
Abstraction is a process where general rules and concepts are derived from the use and classifying of specific examples, literal (reality, real or Abstract and concrete, concrete) signifiers, first principles, or other methods.
"An abstraction" ...
that gathers all the communications among a group of processes over a single shared virtual channel. Processes connected to a bus do not know how it is internally implemented, but the D-Bus specification guarantees that all processes connected to the bus can communicate with each other through it. D-Bus incurs at least a 2.5x performance loss over one-to-one IPC.
Linux desktop environments take advantage of the D-Bus facilities by instantiating multiple buses, notably:
* a single system bus, available to all users and processes of the system, that provides access to system services (i.e. services provided by the
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
and also by any system
daemons); and
* a session bus for each user login session, that provides desktop services to user applications in the same desktop session, and allows the integration of the desktop session as a whole.
A process can connect to any number of buses, provided that it has been granted access to them. In practice, this means that any user process can connect to the system bus and to its current session bus, but not to another user's session buses, or even to a different session bus owned by the same user. The latter restriction may change in the future if all sessions of a user are combined into a single user bus.
D-Bus provides additional or simplifies existing functionality to the applications, including information-sharing, modularity and
privilege separation
Privilege may refer to:
Arts and entertainment
* Privilege (film), ''Privilege'' (film), a 1967 film directed by Peter Watkins
* Privilege (Ivor Cutler album), ''Privilege'' (Ivor Cutler album), 1983
* Privilege (Television Personalities album ...
. For example, information on an incoming voice call received through
Bluetooth
Bluetooth is a short-range wireless technology standard that is used for exchanging data between fixed and mobile devices over short distances and building personal area networks (PANs). In the most widely used mode, transmission power is li ...
or
Skype
Skype () was a proprietary telecommunications application operated by Skype Technologies, a division of Microsoft, best known for IP-based videotelephony, videoconferencing and voice calls. It also had instant messaging, file transfer, ...
can be propagated and interpreted by any currently running music player, which can react by muting the volume or by pausing playback until the call is finished.
D-Bus can also be used as a
framework to integrate different components of a user application. For instance, an
office suite
Productivity software (also called personal productivity software or office productivity software) is application software used for producing information (such as documents, presentations, worksheets, databases, charts, graphs, digital paintin ...
can communicate through the session bus to share data between a
word processor A word processor (WP) is a device or computer program that provides for input, editing, formatting, and output of text, often with some additional features.
Early word processors were stand-alone devices dedicated to the function, but current word ...
and a
spreadsheet
A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in c ...
.
D-Bus specification
Bus model
Every connection to a bus is identified in the context of D-Bus by what is called a ''bus name''. A bus name consists of two or more dot-separated strings of letters, digits, dashes, and underscores—a
reverse domain name. An example of a valid bus name is .
When a process sets up a connection to a bus, the bus assigns to the connection a special bus name called ''unique connection name''. Bus names of this type are immutable—it is guaranteed they will not change as long as the connection exists—and, more importantly, they cannot be reused during the bus lifetime. This means that no other connection to that bus will ever have assigned such unique connection name, even if the same process closes down the connection to the bus and creates a new one. Unique connection names are easily recognizable because they start with the otherwise forbidden colon character. An example of a unique connection name is (the characters after the colon have no particular meaning).
A process can ask for additional bus names for its connection, provided that any requested name is not already being used by another connection to the bus. In D-Bus parlance, when a bus name is assigned to a connection, it is said the connection ''owns'' the bus name. In that sense, a bus name cannot be owned by two connections at the same time, but, unlike unique connection names, these names can be reused if they are available: a process may reclaim a bus name released—purposely or not—by another process.
The idea behind these additional bus names, commonly called ''well-known names'', is to provide a way to refer to a service using a prearranged bus name. For instance, the service that reports the current time and date in the system bus lies in the process whose connection owns the bus name, regardless of which process it is.
Bus names can be used as a simple way to implement single-instance applications (second instances detect that the bus name is already taken). It can also be used to track a service process lifecycle, since the bus sends a notification when a bus name is released due to a process termination.
Object model
Because of its original conception as a replacement for several component oriented communications systems, D-Bus shares with its predecessors an object model in which to express the semantics of the communications between clients and services. The terms used in the D-Bus object model mimic those used by some
object oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s. That does not mean that D-Bus is somehow limited to OOP languages—in fact, the most used implementation () is written in
C, a
procedural programming
Procedural programming is a programming paradigm, classified as imperative programming, that involves implementing the behavior of a computer program as Function (computer programming), procedures (a.k.a. functions, subroutines) that call each o ...
language.

In D-Bus, a process offers its services by exposing ''objects''. These objects have ''methods'' that can be invoked, and ''signals'' that the object can emit. Methods and signals are collectively referred to as the ''members'' of the object. Any client connected to the bus can interact with an object by using its methods, making requests or commanding the object to perform actions. For instance, an object representing a time service can be queried by a client using a method that returns the current date and time. A client can also listen to signals that an object emits when its state changes due to certain events, usually related to the underlying service. An example would be when a service that manages hardware devices—such as USB or network drivers—signals a "new hardware device added" event. Clients should instruct the bus that they are interested in receiving certain signals from a particular object, since a D-Bus bus only passes signals to those processes with a registered interest in them.
A process connected to a D-Bus bus can request it to ''export'' as many D-Bus objects as it wants. Each object is identified by an ''object path'', a string of numbers, letters and underscores separated and prefixed by the slash character, called that because of their resemblance to
Unix filesystem paths. The object path is selected by the requesting process, and must be unique in the context of that bus connection. An example of a valid object path is . However, it is not enforced—but also not discouraged—to form hierarchies within object paths. The particular naming convention for the objects of a service is entirely up to the developers of such service, but many developers choose to
namespace
In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified.
Namespaces ...
them using the reserved
domain name
In the Internet, a domain name is a string that identifies a realm of administrative autonomy, authority, or control. Domain names are often used to identify services provided through the Internet, such as websites, email services, and more. ...
of the project as a prefix (e.g. ).
Every object is inextricably associated to the particular bus connection where it was exported, and, from the D-Bus point of view, only lives in the context of such connection. Therefore, in order to be able to use a certain service, a client must indicate not only the object path providing the desired service, but also the bus name under which the service process is connected to the bus. This in turn allows that several processes connected to the bus can export different objects with identical object paths unambiguously.
An ''interface'' specifies members—methods and signals—that can be used with an object. It is a set of declarations of methods (including its passing and returning parameters) and signals (including its parameters) identified by a dot-separated name resembling the
Java language
Java is a high-level, general-purpose, memory-safe, object-oriented programming language. It is intended to let programmers ''write once, run anywhere'' ( WORA), meaning that compiled Java code can run on all platforms that support Java w ...
interfaces notation. An example of a valid interface name is . Despite their similarity, interface names and bus names should not be mistaken. A D-Bus object can ''implement'' several interfaces, but at least must implement one, providing support for every method and signal defined by it. The combination of all interfaces implemented by an object is called the object ''type''.
When using an object, it is a good practice for the client process to provide the member's interface name besides the member's name, but is only mandatory when there is an ambiguity caused by duplicated member names available from different interfaces implemented by the object—otherwise, the selected member is undefined or erroneous. An emitted signal, on the other hand, must always indicate to which interface it belongs.
The D-Bus specification also defines several standard interfaces that objects may want to implement in addition to its own interfaces. Although technically optional, most D-Bus service developers choose to support them in their exported objects since they offer important additional features to D-Bus clients, such as
introspection
Introspection is the examination of one's own conscious thoughts and feelings. In psychology, the process of introspection relies on the observation of one's mental state, while in a spiritual context it may refer to the examination of one's s ...
. These standard interfaces are:
* : provides a way to test if a D-Bus connection is alive.
* : provides an introspection mechanism by which a client process can, at run-time, get a description (in
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
format) of the interfaces, methods and signals that the object implements.
* : allows a D-Bus object to expose the underlying native object
properties
Property is the ownership of land, resources, improvements or other tangible objects, or intellectual property.
Property may also refer to:
Philosophy and science
* Property (philosophy), in philosophy and logic, an abstraction characterizing an ...
or attributes, or simulate them if it does not exist.
* : when a D-Bus service arranges its objects hierarchically, this interface provides a way to query an object about all sub-objects under its path, as well as their interfaces and properties, using a single method call.
The D-Bus specification defines a number of administrative bus operations (called "bus services") to be performed using the object that resides in the bus name. Each bus reserves this special bus name for itself, and manages any requests made specifically to this combination of bus name and object path. The administrative operations provided by the bus are those defined by the object's interface . These operations are used for example to provide information about the status of the bus, or to manage the request and release of additional ''well-known'' bus names.
Communications model
D-Bus was conceived as a generic, high-level inter-process communication system. To accomplish such goals, D-Bus communications are based on the exchange of ''messages'' between processes instead of "raw bytes". D-Bus messages are high-level discrete items that a process can send through the bus to another connected process. Messages have a well-defined structure (even the types of the data carried in their payload are defined), allowing the bus to validate them and to reject any ill-formed message.
In this regard, D-Bus is closer to an
RPC
RPC may refer to:
Science and technology
* Rational polynomial coefficient
* Reactive Plastic Curtain, a carbon-dioxide-absorbing device used in some rebreather breathing sets
* Regional Playback Control, a regional lockout technology for DVDs ...
mechanism than to a classic IPC mechanism, with its own type definition system and its own
marshaling.

The bus supports two modes of interchanging messages between a client and a service process:
* One-to-one
request-response: This is the way for a client to invoke an object's method. The client sends a message to the service process exporting the object, and the service in turn replies with a message back to the client process. The message sent by the client must contain the object path, the name of the invoked method (and optionally the name of its interface), and the values of the input parameters (if any) as defined by the object's selected interface. The reply message carries the result of the request, including the values of the output parameters returned by the object's method invocation, or ''exception'' information if there was an error.
*
Publish/subscribe: This is the way for an object to announce the occurrence of a signal to the interested parties. The object's service process broadcasts a message that the bus passes only to the connected clients subscribed to the object's signal. The message carries the object path, the name of the signal, the interface to which the signal belongs, and also the values of the signal's parameters (if any). The communication is one-way: there are no response messages to the original message from any client process, since the sender knows neither the identities nor the number of the recipients.
Every D-Bus message consists of a header and a body. The header is formed by several fields that identify the type of message, the sender, as well as information required to deliver the message to its recipient (destination bus name, object path, method or signal name, interface name, etc.). The body contains the data payload that the receiver process interprets—for instance the input or output arguments. All the data is encoded in a well known binary format called the ''wire format'' which supports the
serialization
In computing, serialization (or serialisation, also referred to as pickling in Python (programming language), Python) is the process of translating a data structure or object (computer science), object state into a format that can be stored (e. ...
of various types, such as integers and floating-point numbers, strings, compound types, and so on, also referred to as
marshaling.
The D-Bus specification defines the
wire protocol
In computer networking, a wire protocol refers to a way of getting data from point to point: A wire protocol is needed if more than one application has to interoperate. It generally refers to communication protocols higher than the physical layer ...
: how to build the D-Bus messages to be exchanged between processes within a D-Bus connection. However, it does not define the underlying transport method for delivering these messages.
Internals
Most existing D-Bus implementations follow the architecture of the reference implementation. This architecture consists of two main components:
* a point-to-point communications
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
that implements the D-Bus
wire protocol
In computer networking, a wire protocol refers to a way of getting data from point to point: A wire protocol is needed if more than one application has to interoperate. It generally refers to communication protocols higher than the physical layer ...
in order to exchange messages between two processes. In the reference implementation this library is . In other implementations may be wrapped by another higher-level library, language binding, or entirely replaced by a different standalone implementation that serves the same purpose. This library only supports one-to-one communications between two processes.
*

a special
daemon process that plays the bus role and to which the rest of the processes connect using any D-Bus point-to-point communications library. This process is also known as the ''message bus daemon'', since it is responsible for routing messages from any process connected to the bus to another. In the reference implementation this role is performed by , which itself is built on top of . Another implementation of the message bus daemon is , which is built on top of .
The library (or its equivalent) internally uses a native lower-level IPC mechanism to transport the required D-Bus messages between the two processes in both ends of the D-Bus connection. D-Bus specification does not mandate which particular IPC transport mechanisms should be available to use, as it is the communications library that decides what transport methods it supports. For instance, in Unix-like operating systems such as Linux typically uses
Unix domain socket
A Unix domain socket (UDS), a.k.a. local socket, a.k.a. inter-process communication (IPC) socket, is a communication endpoint for exchanging data between processes executing in the same Unix or Unix-like operating system.
The name, ''Unix domain ...
s as the underlying transport method, but it also supports
TCP sockets.
The communications libraries of both processes must agree on the selected transport method and also on the particular channel used for their communication. This information is defined by what D-Bus calls an ''address''. Unix-domain sockets are
filesystem objects, and therefore they can be identified by a filename, so a valid address would be
unix:path=/tmp/.hiddensocket
. Both processes must pass the same address to their respective communications libraries to establish the D-Bus connection between them. An address can also provide additional data to the communications library in the form of comma-separated
key=value
pairs. This way, for example, it can provide authentication information to a specific type of connection that supports it.
When a message bus daemon like is used to implement a D-Bus bus, all processes that want to connect to the bus must know the ''bus address'', the address by which a process can establish a D-Bus connection to the central message bus process. In this scenario, the message bus daemon selects the bus address and the remainder processes must pass that value to their corresponding or equivalent libraries. defines a different bus address for every bus instance it provides. These addresses are defined in the daemon's configuration files.
Two processes can use a D-Bus connection to exchange messages directly between them, but this is not the way in which D-Bus is normally intended to be used. The usual way is to always use a message bus daemon (i.e. ) as a communications central point to which each process should establish its point-to-point D-Bus connection. When a process—client or service—sends a D-Bus message, the message bus process receives it in the first instance and delivers it to the appropriate recipient. The message bus daemon may be seen as a hub or router in charge of getting each message to its destination by repeating it through the D-Bus connection to the recipient process. The recipient process is determined by the destination bus name in the message's header field, or by the subscription information to signals maintained by the message bus daemon in the case of signal propagation messages. The message bus daemon can also produce its own messages as a response to certain conditions, such as an error message to a process that sent a message to a nonexistent bus name.
improves the feature set already provided by D-Bus itself with additional functionality. For example, ''service activation'' allows automatic starting of services when needed—when the first request to any bus name of such service arrives at the message bus daemon. This way, service processes neither need to be launched during the
system initialization or user initialization stage nor need they consume memory or other resources when not being used. This feature was originally implemented using
setuid
The Unix and Linux access rights flags setuid and setgid (short for ''set user identity'' and ''set group identity'') allow users to run an executable with the file system permissions of the executable's owner or group respectively and to chang ...
helpers, but nowadays it can also be provided by
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
's service activation framework. Service activation is an important feature that facilitates the management of the process lifecycle of services (for example when a desktop component should start or stop).
History and adoption
D-Bus was started in 2002 by Havoc Pennington, Alex Larsson (
Red Hat
Red Hat, Inc. (formerly Red Hat Software, Inc.) is an American software company that provides open source software products to enterprises and is a subsidiary of IBM. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North ...
) and Anders Carlsson. The version 1.0—considered
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
stable—was released in November 2006.

Heavily influenced by the
DCOP system used by versions 2 and 3 of
KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
, D-Bus has replaced DCOP in the
KDE 4
KDE Software Compilation 4 (KDE SC 4) was the only series of the so-called KDE Software Compilation (KDE SC), first released in January 2008. The final release was version 4.14.3 in November 2014. It was the follow-up to K Desktop Environment ...
release. An implementation of D-Bus supports most
POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
operating systems, and a port for
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
exists. It is used by
Qt 4 and later by
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
. In GNOME it has gradually replaced most parts of the earlier
Bonobo
The bonobo (; ''Pan paniscus''), also historically called the pygmy chimpanzee (less often the dwarf chimpanzee or gracile chimpanzee), is an endangered great ape and one of the two species making up the genus ''Pan (genus), Pan'' (the other bei ...
mechanism. It is also used by
Xfce
Xfce or XFCE (pronounced as four individual letters, ) is a Free and open-source software, free and open-source desktop environment for Linux and other Unix-like operating systems.
Xfce aims to be fast and Lightweight software, lightweight whil ...
.
One of the earlier adopters was the (nowadays deprecated)
Hardware Abstraction Layer
Hardware abstractions are sets of routines in software that provide programs with access to hardware resources through programming interfaces. The programming interface allows all devices in a particular class ''C'' of hardware devices to be acc ...
. HAL used D-Bus to export information about hardware that has been added to or removed from the computer.
The usage of D-Bus is steadily expanding beyond the initial scope of desktop environments to cover an increasing amount of system services. For instance, the
NetworkManager
NetworkManager is a daemon that sits on top of libudev and other Linux kernel interfaces (and a couple of other daemons) and provides a high-level interface for the configuration of the network interfaces.
Rationale
NetworkManager is a software ...
network daemon,
BlueZ
A Bluetooth stack is software that is an implementation of the Bluetooth protocol stack.
Bluetooth stacks can be roughly divided into two distinct categories:
# ''General-purpose'' implementations that are written with emphasis on feature-richn ...
bluetooth stack and
PulseAudio
PulseAudio is a network-capable sound server program distributed via the freedesktop.org project. It runs mainly on Linux, including Windows Subsystem for Linux on Microsoft Windows and Termux on Android; various BSD distributions such as ...
sound server use D-Bus to provide part or all of their services.
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
uses the D-Bus wire protocol for communication between
and systemd, and is also promoting traditional system daemons to D-Bus services, such as
logind
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
. Another heavy user of D-Bus is
Polkit
Polkit (formerly PolicyKit) is a component for controlling system-wide privileges in Unix-like operating systems. It provides an organized way for non-privileged processes to communicate with privileged ones. Polkit allows a level of control of ...
, whose policy authority daemon is implemented as a service connected to the system bus.
Implementations
libdbus
Although there are several implementations of D-Bus, the most widely used is the reference implementation ''libdbus'', developed by the same freedesktop.org project that designed the specification. However, libdbus is a low-level implementation that was never meant to be used directly by application developers, but as a reference guide for other reimplementations of D-Bus (such as those included in standard libraries of desktop environments, or in
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
bindings). The freedesktop.org project itself recommends applications authors to "use one of the higher level bindings or implementations" instead.
GDBus
GDBus is an implementation of D-Bus based on
GIO streams included in
GLib
GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since ...
, aiming to be used by
GTK+
GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary s ...
and
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
. GDBus is not a wrapper of libdbus, but a complete and independent reimplementation of the D-Bus specification and protocol.
MATE Desktop and
Xfce
Xfce or XFCE (pronounced as four individual letters, ) is a Free and open-source software, free and open-source desktop environment for Linux and other Unix-like operating systems.
Xfce aims to be fast and Lightweight software, lightweight whil ...
(version 4.14), which are also based on GTK+ 3, also use GDBus.
sd-bus
In 2013, the
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
project rewrote libdbus in an effort to simplify the code, but it also resulted in a significant increase of the overall D-Bus performance. In preliminary benchmarks,
BMW
Bayerische Motoren Werke AG, trading as BMW Group (commonly abbreviated to BMW (), sometimes anglicised as Bavarian Motor Works), is a German multinational manufacturer of vehicles and motorcycles headquartered in Munich, Bavaria, Germany. Th ...
found that the systemd's D-Bus library increased performance by 360%. By version 221 of
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
, released in 2015, the sd-bus
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
was declared stable.
kdbus

''kdbus'' was a project that aimed to reimplement D-Bus as a kernel-mediated peer-to-peer
inter-process communication
In computer science, interprocess communication (IPC) is the sharing of data between running Process (computing), processes in a computer system. Mechanisms for IPC may be provided by an operating system. Applications which use IPC are often cat ...
mechanism. Beside performance improvements, kdbus would have advantages arising from other
Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
features such as
namespaces
In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified.
Namespaces ...
and auditing, security from the kernel mediating, closing race conditions, and allowing D-Bus to be used during boot and shutdown (as needed by systemd). kdbus inclusion in the Linux kernel proved controversial, and was dropped in favor o
BUS1 as a more generic
inter-process communication
In computer science, interprocess communication (IPC) is the sharing of data between running Process (computing), processes in a computer system. Mechanisms for IPC may be provided by an operating system. Applications which use IPC are often cat ...
.
Language bindings
Several programming language
bindings for D-Bus have been developed, such as those for
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
,
C#,
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
,
Rust
Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
and
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
.
See also
*
Linux on the desktop
Besides the Linux distributions designed for general-purpose use on desktops and servers, distributions may be specialized for different purposes including computer architecture support, embedded systems, stability, security, localization to a spe ...
*
Common Language Infrastructure
The Common Language Infrastructure (CLI) is an open specification and technical standard originally developed by Microsoft and standardized by International Organization for Standardization, ISO/International Electrotechnical Commission, IEC (ISO/ ...
*
Common Object Request Broker Architecture
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sy ...
*
Component Object Model
Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines ...
*
Distributed Component Object Model
Distributed Component Object Model (DCOM) is a proprietary Microsoft technology for communication between software components on networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the co ...
*
Foreign function interface
A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into a bin ...
*
Java remote method invocation
The Java Remote Method Invocation (Java RMI) is a Java API that performs remote method invocation, the object-oriented equivalent of remote procedure calls (RPC), with support for direct transfer of serialized Java classes and distributed garb ...
*
Remote procedure call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared computer network), which is written as if it were a ...
*
XPCOM
Cross Platform Component Object Model (XPCOM) is a cross-platform component model from Mozilla. It is similar to Component Object Model (COM), Common Object Request Broker Architecture (CORBA) and system object model (SOM). It features multiple ...
References
External links
D-Bushome page at Freedesktop.org
Introduction to D-Buson the Freedesktop.org wiki
{{Inter-process communication
Application layer protocols
C++ libraries
Collabora
Free network-related software
Freedesktop.org
Inter-process communication
Remote procedure call
Software using the Academic Free License