[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[it works now] Re: how to get a mounted USB stick icon on desktop



Apparently, _H. S._, on 29/10/04 15:25,typed:
I am using udev to detect and mount a USB external floppy drive. When I mount the floppy drive, an icon appears on the desktop and when I umount it, it dissappears. Recently I added a udev rule to mount a USB stick in a similar fashion but I am not getting the icon for the mounted USB stick on the desktop. What am I missing here? I also mount/umount the 'disk mounter' utility of gnome panels.

Running Debian Unstable on Dell Inspiron 5160 laptop with kernel 2.6.7.
{~}> dpkg -l udev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                      Version                   Description
+++-=========================-=========================-================================================================== ii udev 0.040-1 /dev/ management daemon
{~}> lsmod | grep us
mousedev               10704  1
psmouse                20616  0
usbcore               117440  4 uhci_hcd,ehci_hcd
{~}> lsmod | grep scsi
scsi_mod              127492  1 sd_mod

Thanks,
->HS


I again tried plugging in the USB stick and lo and behold, there was the icon on the desktop with label "usbstick" (the same as it's mount point). Now what did I change? Nothing. Didn't change anything in gnome-volume-manager even. I think when I rebooted the laptop this morning everything fell into place (I had made my udev rules yesterday -- and that is all I did, didn't change anything else in Sid).

Here is what I have installed (for others who are trying to get mounted icons on desktop):
{~}> dpkg -l hotplug udev hal gnome-vol* gnome-desk*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                 Version              Description
+++-====================-====================-========================================================
ii  hotplug              0.0.20040329-16      Linux Hotplug Scripts
ii  udev                 0.040-1              /dev/ management daemon
ii  hal                  0.2.98-6             Hardware Abstraction Layer
ii gnome-volume-manager 1.0.2-3 GNOME daemon to auto-mount and manage media devices
un  gnome-desktop        <none>               (no description available)
ii gnome-desktop-data 2.6.1-2 Common files for GNOME 2 desktop apps
pn  gnome-desktop-enviro <none>               (no description available)


Here are my udev rules
#--------------------------------
{~}> cat /etc/udev/rules.d/udev_hs_inspiron5160.rules
#Rules created by HS,29Oct,2004, for the Dell Inspiron 5160 laptop.

#In these rules, whatever devices I create, I give them a prefix of "hs-" just #to keep them separate from system devices. Not sure if this is necessary but
#just in case ...


#rule for the USB floppy drive
#to find out info about this, plug it in any USB port of laptop and give
#the command "udevinfo -a -p /sys/block/sd[ab]" where [ab] means either a or b
#here.
BUS="usb", KERNEL="sd?", SYSFS{product}="TEAC*", NAME="hs-floppy-%k", SYMLINK="hs-fd-usb"

#the following rule is for the Lexar 256MB jump drive
BUS="usb", KERNEL="sd*", SYSFS{product}="JUMPDRIVE ELITE", NAME="hs-jd-%k", SYMLINK="hs-jd-usb%n"
#--------------------------------



And here is my /etc/fstab file:
#--------------------------------
{~}> cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hdc7       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdc6       /boot           ext3    defaults        0       2
/dev/hdc11      /home           ext3    defaults        0       2
/dev/hdc9       /tmp            ext3    defaults        0       2
/dev/hdc8       /usr            ext3    defaults        0       2
/dev/hdc10      /var            ext3    defaults        0       2
/dev/hdc12      none            swap    sw              0       0
/dev/hda        /media/cdrom0   auto    rw,user,noauto  0       0
#/dev/sda       /media/usb0     auto    rw,user,noauto  0       0
/dev/hs-fd-usb  /media/floppy   auto    rw,user,noauto  0       0
#the following it to mound USB Jump drive from udev created symlinks
/dev/hs-jd-usb  /media/usbstick auto    rw,user,noauto  0       0
#--------------------------------

I have configures my desktop to mount a 6-in-1 Sandisk memory card as well. If anyone one wants help in that, just let me know. And if anyone has suggestions feel free to share.

GL,
->HS



Reply to: