DBus, no need to present it anymore, is one of master piece of current systems.

It is everywhere, used by lots of applications. It makes application communication easy and provides a simple model for local service providing. Continuing the good old unix tradition, it does little but does it well.

We will intend to look for develop with DBus in C++.

The beginning of the Odyssey

The biggest problem for developers is its documentation or its lack of documentation. And especially its lack of documentation for C++.

The official DBus documentation - found on the FreeDesktop site - is really disparate. We can found:

  • A tutorial which present DBus, how it works, but introduces samples which use GLib binding. As well see the GNOME developer center and their pages related to high level and low level DBus support. Moreover, GLib approach constrains us to link with GLib.
  • One Python tutorial interesting but in Python. We can refer DBus Python overview which provides some useful details to understand the protocol. But it is useless to develop in C++.
  • The binding page which present some approaches of C+ + usages (dbus-cpp, dbus-c++ or dbus-cxx) but it looks like the rat race and the status of these projects are not really clear.

I would add some pages found by my favorite web searcher:

Event the good old Wikipedia does not really help.

Finally, I have found 2 libraries hosted on SourceForge: dbus-cxx and libdbus-c++.

A difficult choice


dbus-cxx is distributed on GPL 3. Its documentation, generated with Doxygen, seems sufficiently complete and offers easy samples to start. It announces being distributed in Fedora 9+ and in Ubuntu with a dedicated PPA (from Launchpad).


libdbus-c++ is distributed on LGPL 2.1+ Its documentation, generated with Doxygen, is restricted to the minimum. No sample, no tutorial. It announces no support in any favorite distributions but a little look at my synaptic (LinuxMint 13 - Maya) show me that it is directly available (lib, dev and doc). It provides two little tools with the package:

  • dbusxx-introspect which introspects a service and serialize its description in XML.
  • dbusxx-xml2cpp which read an introspected XML file and produces some C++ headers with proxy classes.

In view of the various arguments, we will try to investigate around the libdbus-c++.