While debugging a goofy GNOME / USB interoperability issue this week, I came across the dbus-monitor program. Dbus-monitor allows you to view messages as they are sent on the DBUS message bus, which can be amazingly useful for debugging hardware and software interoperability issues. To print the messages that are traveling on the system message bus (DBUS defines two types of buses, one is the system bus, the other is a per session bus), dbus-monitor can be run with the “-system” option:
signal sender=org.freedesktop.DBus -> dest=:1.4 interface=org.freedesktop.DBus; member=NameAcquired 0 string ":1.4" signal sender=:1.0 -> dest=(null destination) interface=org.freedesktop.Hal.Manager; member=DeviceRemoved 0 string "/org/freedesktop/Hal/devices/volume_label_" signal sender=:1.0 -> dest=(null destination) interface=org.freedesktop.Hal.Manager; member=DeviceAdded 0 string "/org/freedesktop/Hal/devices/volume_label_"
In this example, you can see that two message were sent when a hardware device was added and removed from the system. After reading through a slew of documentation, I am finally starting to understand how all of the GNOME packages tie in one another. Yikes!