Ubuntu – How to hide CIFS volumes in the Places menu

10.10gnomemenu

I originally started an Ubuntu forums post about this but I never received any responses. Anyways, I've got my Documents, Music, Pictures, and Videos folders pointing to Samba shares on my server via CIFS volumes mounted in my fstab file. The problem is I end up with duplicate entries in the Places menu.

I can remove the bookmarks for those folders but then the menu looks ugly as the mounted volumes are still displayed and I can't find a way change their icons in the menu. I've circled the offending menu entries in the screenshot. How can I hide them?

screenshot

Best Answer

  • You can hide the volumes in Places Menu.Type the following in terminal to create a new file hide-partitions.rules under /etc/udev/rules.d

    sudo gedit /etc/udev/rules.d/hide-partitions.rules

  • Now copy/paste the following to hide-partitions.rules

    ACTION!="add|change", GOTO="hide_partition_end"
    SUBSYSTEM!="block", GOTO="hide_partition_end"
    KERNEL=="loop*|ram*", GOTO="hide_partition_end"
    KERNEL=="sda5", ENV{UDISKS_PRESENTATION_HIDE}="1"
    LABEL="hide_partition_end"

  • Save the file and close it.

  • Now we are going to hide the partition sda6(Stuffs) from Places Menu. alt text

  • Edit the fstab file

    sudo gedit /etc/fstab

  • Put a # in front of the line

    UUID=B630D52430D4EC7D /media/sda6 ntfs-3g defaults,locale=en_IN 0 0

  • So it becomes

    #UUID=B630D52430D4EC7D /media/sda6 ntfs-3g defaults,locale=en_IN 0 0

  • Save the file.

  • Reboot the sytem.

  • Now the volume Stuffs will be removed from the Places Menu.
    alt text

Related Question