I was asked how I found out about the proper DBus signals etc. - well, that was the difficult part. DBus is supposed to allow introspection (I guess the dbus-browser that used to exist was using that), but not all appications provide this information. So often you have to browse some applications source code to find the appropriate values.

For NetworkManager, I read to source of the gnome applet to locate the “wake” and “sleep” calls. For Gaim, I was reading the gaim source code.

If you are lucky, Introspection could do the trick for you. Just fire up Python and do e.g.:

import dbus, dbus.glib
sysbus = dbus.SystemBus()
nm_obj = sysbus.get_object('org.freedesktop.NetworkManager',
                        '/org/freedesktop/NetworkManager')
nm_obj.Introspect()

which result in something like this:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="Devices"/>
  <node name="VPNConnections"/>
</node>

… which unfortunately doesn’t seem to be complete, but a hard coded pre-alpha reply to the Introspect() call.

Maybe that’s why the dbus browser has disappeared?