I previously did a post on how to Create a Button to Restart USB in Ubuntu. The purpose of that procedure was to get the USB hub in my HP w2207 monitor to recognize a flash drive that had been inserted into one of the ports.
Well I've found a better way to force this recognition that doesn't require root permission. It turns out that issuing the lsusb command polls all of the USB devices and causes my flash drive to be recognized and automounted. You can try this in a terminal with:
Again, it's nice to have a launcher icon for this procedure to make things easier for my wife. At first I thought I could simply create a launcher that used lsusb >/dev/null, but for an unknown reason, it doesn't work. I was able to write a script that worked though, and calling my script from a launcher works to mount the USB drive.
I saved the following script as /home/userid/bin/read_usb
#!/bin/bash## Script *read_usb*. Place file in ~/bin. Make sure to make
# executable with "chmod +x read_usb".
# For desktop launcher, use command "/home/user/bin/read_usb".
lsusb >/dev/null
exit 0
Make sure to make the script executable with
Now that we have an executable script, we can make a desktop launcher for it. Right click on the desktop and select Create Launcher. In the Name field enter Read USB. In the Command field enter /home/userid/bin/read_usb. If you like, click the springboard icon to select a different icon for your launcher. I used /usr/share/icons/crystalsvg/48x48/apps/usb.png. Now click OK in the Create Launcher window and you're done.
If you prefer to make a panel launcher instead, just start the same procedure by right clicking on the panel and selecting Add to Panel. Then select Custom Application Launcher and click Add. The rest of the procedure should be the same from there.
#
If your PC hardware does not handle USB events well. (Levono for instance)
run a cronjob
Each minute the actual USB status is updated
Kees
#
Thanks for the tip!
#
huh, my usb flash doesn't get recognised even by issuing "lsusb"