Announcement

Collapse
No announcement yet.

Desktop Icon for mounted usbdrives

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Desktop Icon for mounted usbdrives

    I'm having problems with getting my kubuntu to show a desktop icon for mounted usb devices. Can anyone tell me how to?

    THX FOX

    #2
    I assume you get the system tray 'Device Notifier' icon ok? And you want a desktop icon for each removable device, like in gnome or xfce?

    I think you would have to do this with a Folder View widget on the desktop, but I can't see what you would apply in the settings to get removeable devices ... maybe just point it to the /media folder.
    I'd rather be locked out than locked in.

    Comment


      #3
      Plasma widgets

      The default device notifier for the plasma desktop is http://userbase.kde.org/Plasma/DeviceNotifier


      There are other options: http://kde-look.org/content/show.php...content=115943
      Description:
      This plasmoid provides a way to mount/unmount devices from fstab (e.g. network shares), show free space and open mount point location in a file manager. It is fully configurable and supports fusefs and sshfs (don't forget to install a SSH_ASKPASS agent).

      It now supports dis/connecting a LAN device through WakeOnLAN.

      unmounted/mounted device

      - the device need to be in the fstab and it should have a permanent mountpoint (?).
      - binaries can be found from the ppa: https://launchpad.net/ubuntu/+ppas?name_filter=mountoid
      Have you tried ?

      - How to Ask a Question on the Internet and Get It Answered
      - How To Ask Questions The Smart Way

      Comment


        #4
        I think the OP was looking for functionality like gnome 2 where a usb drive pops up an icon on the desktop when inserted. I think the real issue is that the KDE devs opted for a different approach an use the Device Notifier instead. I would guess this has to do with the change from the "old style" static desktop to the new Activity based approach. I personally like the notifier.

        Unless someone writes a new widget to support this behavior, the OP might be out of luck.

        Another approach would be to add a "Folder View" widget to the desktop, select the "Specify a folder" option and select /media/ (the default auto-mount location for plug-able devices) and then find out where one has to set all these devices to mount at insertion automatically.

        I haven't tested this solution (came from Arch forum) but you could try it to force automounting when inserted: Install the package "usbmount" and then create the file /etc/udev/rules.d/69-local.rules and insert this text:

        Code:
        [COLOR=#000000][FONT=Verdana]# Leave sda to fstab[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]KERNEL!="sd[b-z]*", GOTO="media_by_label_auto_mount_end"[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]# If booted from /dev/sdb with home on /dev/sdb5:[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]# KERNEL!="sd[c-z]*", GOTO="media_by_label_auto_mount_end"[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]# KERNEL=="sdb5", GOTO="media_by_label_auto_mount_end"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Handling only ext4 partitions; better leave this commented out[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]# ENV{ID_FS_TYPE}!="ext4", GOTO="media_by_label_auto_mount_end"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Import FS info[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]IMPORT{program}="/sbin/blkid -o udev -p %N"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Get a label if present, otherwise specify one[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Mount options[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ACTION=="add", ENV{ID_FS_TYPE}=="ext3|ext4", ENV{mount_options}="rw,nodev,nosuid,relatime,acl,uhelper=udisks"[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="rw,relatime,utf8,gid=100,umask=002,uhelper=udisks"[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ACTION=="add", ENV{ID_FS_TYPE}=="hfsplus", ENV{mount_options}="rw,nosuid,nodev,uhelper=udisks"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Mount the device[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -t %E{ID_FS_TYPE} -o %E{mount_options} /dev/%k /media/%E{dir_name}"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Clean up after removal[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]ACTION=="remove", RUN+="/bin/umount /dev/%k", RUN+="/bin/rmdir /media/%E{dir_name}"[/FONT][/COLOR]
        
        [COLOR=#000000][FONT=Verdana]# Exit[/FONT][/COLOR]
        [COLOR=#000000][FONT=Verdana]LABEL="media_by_label_auto_mount_end"
        [/FONT][/COLOR]

        Please Read Me

        Comment


          #5
          thx, i'll see what i can do

          Comment

          Working...
          X