Hmm... a long time ago, I wrote a little Python GNOME-applet - perhaps looking at the source (and README) for that will help?? http://www.gnomefiles.org/app.php?soft_id=745