Practical Technology

for practical people.

D-Bus 1.0 offers desktop Linux app interoperability

| 0 comments

D-Bus 1.0 seems at the same time to be both such a simple and such an esoteric thing. On the one hand, it’s simply another IPC (interprocess communication) system. On the other, it may prove as important for Linux desktop developers as ActiveX has been for Windows programmers.

The importance of this first release of D-Bus from the FreeDesktop.org project is that D-Bus will go a long way toward improving interoperability between Linux desktop applications. D-Bus has already been adopted by the Portland Project for its forthcoming DAPI (Desktop Application Programming Interface).

In practice, besides providing an easy way for programs to talk to each other while running, D-Bus helps coordinate the process lifecycle. For example, it makes it simple to code a “single instance” of an application or daemon, or to launch multiple instances of them when they’re needed.

Underneath the hood, D-Bus supplies both a system daemon and a per-user-login-session daemon. So, for example, a D-Bus system daemon can provide a single common way for any Linux desktop to check for when a new USB device is attached. A user session daemon, on the other hand, could help automatically transfer data from a spreadsheet to a report.

The D-Bus message bus is built on top of a general one-to-one message passing framework to speed IPC interactions. So, for example, the data can run from the spreadsheet to the report without needing to go through the message bus daemon. In this first version, this one-to-one application passing can only work on applications that are either on a single computer, or, for the security unconscious, over unencrypted TCP/IP. Programmers are already working on adding other, more secure, network protocols, so D-Bus can also become a safe network IPC.

Many Linux desktop projects are already using D-Bus. These include the Beagle search tool, the GNOME power manager, and CUPS (Common UNIX Printing System).

KDE core developer Daniel Molkentin writes that “D-Bus has completely replaced DCOP (Desktop Communications Protocol) as the IPC System of choice for KDE.”

With programs already in place using earlier versions of D-Bus, plus strong support from Portland, GNOME, and KDE, D-Bus seems to be well along the path of becoming one of the foundations of tomorrow’s Linux desktop.

D-Bus 1.0 source code and documentation are available from the FreeDesktop D-Bus Wiki.

Leave a Reply