Is it not possible to have a filemanager popup with the content of the USB device - if it is a hard drive or memory stick ??
Yes, that can be done, but that's a different article altogether. I wrote a summary of how to do this with just udev here:
http://www.skepticats.com/linlog/content/udevautorun/
If you use GNOME, I understand you can do this with the GNOME volume manager. If you distribution comes with HAL and D-BUS, you can also use IVMan for this.
hi
with recent kernels hotplug is vanished replaced by udev; i am not able to find /etc/dev.d, anymore; i have to use an autorun when an usb pen is automounted like http://linlog.skepticats.com/content/udevautorun/ explain.
But, at the moment, i am not able to find a place where put bash script to be executed.
Any advice would unvaluable
These days, you can do the same sort of thing with udev rules. You would create/edit a file in your /etc/udev/rules.d directory that specifies the device and the script you want to run.
You can see an example rule in this entry:
http://linlog.skepticats.com/entries/2007/11/Fixing_Sansa_attributes.php
In that case, the rule has 4 parts:
1) The kernel device - here a USB mass storage node like sda0.
2) The action - "add" for inserting the device.
3) Some attributes - in this case the model string, to distinguish it from other USB devices.
4) The RUN action, which just executes a program, in this case passing it the kernel device name as a parameter.
Hopefully that should get you started. The only hard part if figuring out the exact attributes you need to identify a particular device.
Add your comments #
A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.