"autorun" type functionality from automounter

Jason D. Clinton me at jasonclinton.com
Mon Jul 31 14:54:41 CDT 2006


On Mon, 2006-07-31 at 10:53 -0500, Justin Dugger wrote:
> Or if you want something a bit more attached to your user's session
> rather than the system, you could investigate dbus/hal.  This is how
> GNOME automatically mounts USB drives and CD drives as your user,
> among other things.  In fact, one of the options I see under
> "Removable Media and Storage" is which command to run when a Portable
> Music Player is connected.  It seems to be oriented to playing music
> locally, but I see no reason why you can't change the command to do
> your sync instead of starting rhythmbox.

That might be a nice option as long as it works. You'll want to create
a .desktop file that causes the program to run in a terminal.

Also, note that hal is notified by udev via a socket. Hal, in turn,
issues a dbus event. So if you want to do your own dbus listener, you
could write something in Python or Ruby but it would have to run as a
daemon.

All in all it would be easiest to do it from a udev rule; friendliest to
do it from GNOME's dbus listener.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://kclug.org/pipermail/kclug/attachments/20060731/99c99bc1/attachment.pgp 


More information about the Kclug mailing list