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
THX FOX
[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]
Comment