[Gllug] Dbus/Hal - doing useful things

Huw Lynes huw-l at moving-picture.com
Thu Oct 20 11:52:48 UTC 2005


Having been working my way through the sketchy Hal and Dbus
documentation I know that what I want to do is possible but I don't know
how.

If I plug a USB-storage device in Hal picks it up and messages get
broadcast across Dbus. If I use dbus-monitor --system I can see the
messages and even pick out the ID of the device.

What I want to do is run a program when a particular device gets
attached. I could write a python app (the dbus python bindings don't
look that hard) and get Gnome to autostart it. Then it can listen to
Dbus and do it's stuff when it sees the device get attached.

However this seems like the wrong way to do it. Hal and Dbus are already
watching for these events. So is there a way to get Hal or Dbus to
launch a script on a particular event?

Thanks,
Huw

-- 
| Huw Lynes               | The Moving Picture Company  |
| System Administrator    | 127 Wardour Street          |
|.........................| London, W1F 0NL             |

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list