cwaldbieser
February 14th, 2005, 04:32 AM
I installed KDE 3.2 for my Ubuntu system, and it seemed to work fairly well, but I noticed some little things that I thought I'd try to correct. One thing was that when I plug in my USB drive, it doesn't automount, put an icon on the desktop, or open the drive in the file manager (under GNOME, all these things happen).
I did some reading, and I added a line to my /etc/fstab so normal users could mount and use the drive. Next I read about the hotplug system for Linux, and it seemed that all I had to do was write a .usermap file that calls a script I write that does all the heavy lifting.
I have been beating my brains out trying to get a simple script to work. It is supposed to copy a desktop shortcut to the usb drive to my desktop when the drive is plugged in, but something is going wrong, and I am not sure exactly what.
I tried calling the /etc/hotplug/usb.agent script manually with DEBUG=yes, but all it seems to tell me is that the usb.agent script can't figure out how to load my script.
Anybody have any experience with this? I am including my .usermap and script in case anyone wants to take a peek and let me know what's going wrong.
Thanks,
Carl Waldbieser
-------- begin /etc/hotplug/usb/flashdrive.usermap -------------------
flashdrive 0x0003 0x05dc 0x0080 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
-------- end /etc/hotplug/usb/flashdrive.usermap ---------------------
-------- begin /etc/hotplug/usb/flashdrive ---------------------------
#!/bin/bash
if [ "$ACTION" = "add" ]; then
cp "/home/carl/USB Drive.desktop" /home/carl/Desktop
fi
---------end /etc/hotplug/usb/flashdrive ----------------------------
I did some reading, and I added a line to my /etc/fstab so normal users could mount and use the drive. Next I read about the hotplug system for Linux, and it seemed that all I had to do was write a .usermap file that calls a script I write that does all the heavy lifting.
I have been beating my brains out trying to get a simple script to work. It is supposed to copy a desktop shortcut to the usb drive to my desktop when the drive is plugged in, but something is going wrong, and I am not sure exactly what.
I tried calling the /etc/hotplug/usb.agent script manually with DEBUG=yes, but all it seems to tell me is that the usb.agent script can't figure out how to load my script.
Anybody have any experience with this? I am including my .usermap and script in case anyone wants to take a peek and let me know what's going wrong.
Thanks,
Carl Waldbieser
-------- begin /etc/hotplug/usb/flashdrive.usermap -------------------
flashdrive 0x0003 0x05dc 0x0080 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
-------- end /etc/hotplug/usb/flashdrive.usermap ---------------------
-------- begin /etc/hotplug/usb/flashdrive ---------------------------
#!/bin/bash
if [ "$ACTION" = "add" ]; then
cp "/home/carl/USB Drive.desktop" /home/carl/Desktop
fi
---------end /etc/hotplug/usb/flashdrive ----------------------------