On Fri, Dec 05, 2003 at 08:41:20PM +0900, Quynh Nguyen Anh wrote: > hello, > > i want to write a program that get notified when a usb device (exactly a > usb memory key) is plugged into the usb port of the machine. i guess > hotplug fits this job well. > > but i dont know how to register my program to hotplug, so it can be > notified. may you please show me the way? (it is best to have some > examples or source codes) Just put two files into /etc/hotplug/usb/*. Hotplug will read the *.usermap and if it matches the USB device it calls given script. Here is a simple example i use for my DigiCam. Kay