Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
I have updated my answer and it's working.Check it... –  karthick87 Dec 12 '10 at 19:35
1  
You might find the answers to Selective mounted volumes for the GNOME Desktop and Nautilus Sidebar useful. –  8128 Dec 12 '10 at 20:51

2 Answers 2

  • 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

share|improve this answer
    
Well, they are all currently mounted to their respective folders in my /home directory as opposed to /media. You gave me an idea though. Maybe I can mount them in /mnt in fstab and then --bind them to the home folders via a startup script. –  Ramón Dec 11 '10 at 20:13
    
Is sda5 in the line KERNEL=="sda5", ENV{UDISKS_PRESENTATION_HIDE}="1" supposed to be sda6 (in your example anyways)? Also, what can I "man" to learn the syntax for this file? I have multiple partitions to try this on. Thanks! –  Ramón Dec 13 '10 at 17:16
    
If you want to hide sda6 then change the line to the following KERNEL=="sda6", ENV{UDISKS_PRESENTATION_HIDE}="1" suppose if you want to hide another partition say sda7 just add one more line KERNEL=="sda7", ENV{UDISKS_PRESENTATION_HIDE}="1" –  karthick87 Dec 13 '10 at 17:20
1  
Well, I finally got a chance to try this today. It's a great answer but it doesn't work for CIFS mounts. The entries in my fstab file look like this: "//<ip_address>/documents /home/ramon/Documents smbfs iocharset=utf8,credentials=/home/ramon/.smbcredentials,gid=1000 0 0" There is no device name to add to the .rules file. Thanks for the answer anyways. –  Ramón Dec 15 '10 at 16:29
up vote 1 down vote accepted

@fluteflute: The answer in the question you linked helped guide me to a workable solution. What I ended up doing was changing the mount points from my /home folder to the /mnt folder in the /etc/fstab file and then replacing the folders in my home directory with symbolic links to the mounted locations.

ln -s /mnt/documents/ /home/ramon/Documents

It's all good now! My Documents, Video, Music, and Pictures folders no longer have duplicate entries in the places menu and are still mapped to the remote file system on my server. Thanks for the help guys.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.