Mint 12: Hide unwanted devices in Nautilus

Friday, February 10th, 2012 | Linux, Tech-savvy

My laptop consists of quite a few partitions, different OSs and file systems. Nautilus displays everything that will be mounted to /media as a device in the places sidebar. This became an annoyance, because I really don’t need to see my Win7 system partition and my old Mint 10 partitions on a regular basis. I tried the easy way: right-click on an item and say “remove” or something – naaat!

I was looking for an easy solution and came across some pretty old forum posts and workarounds that simply don’t work (any more). Here is how I managed to get rid of the unwanted device entries fairly easily: you simply have to explicitly mount the unwanted volumes and use a folder other than /media – basically /mnt will do. This way you don’t have the unwanted file systems listed in Nautilus directly yet can access them easily by navigating to /mnt/mountpoint.

Step by step:

  1. open nautilus
  2. mount all unwanted files systems by selecting them one after another
  3. open a terminal
  4. list mounted devices
    nick@mintbox ~ $ mount
  5. look for the entries that resemble the unwanted files systems
  6. write down the /dev/sdx and type attributes
  7. create mountpoints for each device in in /mnt
    nick@mintbox ~ $ sudo mkdir /mnt/exampleMountPoint1
    nick@mintbox ~ $ sudo mkdir /mnt/exampleMountPoint2
  8. open fstab
    nick@mintbox ~ $ sudo gedit /etc/fstab
  9. add a fstab entry for each device (first is a Win NTFS partition, second a ext4 Linux one)
    /dev/sda6   /mnt/exampleMountPoint1   ntfs-3g   defaults 0 0
    /dev/sda7   /mnt/exampleMountPoint2   ext4      defaults 0 0

That should do the trick.

Tags: , ,

No comments yet.

Leave a comment

Search

Categories