What causes file managers to show drives?

What forces a file manager to show unmounted partitions in the left pane?

That is - what process is it that causes filemanagers to show drives - it's not fstab - I can show that here, I know that inserting a mountable volume makes it show.

I'm trying to understand what it is that actually gives the filemanager the signal to show the partition in the first place.


The name of the program causing Nautilus to show partition in the left side bar is gvfs-gdu-volume. To kill this process, run this command to see the PID of the program

sudo ps -e | grep gvfs-gdu-volume

In my system, the output is

 6642 ?        00:00:00 gvfs-gdu-volume

So, I know the PID is 6642, it may vary by time to time.

Kill that process with

sudo kill -9 PID-of-gvfs-gdu-volume.

Or as a one liner, try this

sudo kill -9 `ps -e | grep gvfs-gdu-volume | cut -f 2 -d ' '`

Open nautilus to see the magic !

image of nautilus in Ubuntu 12.04

This image is from thunar in Xubuntu 12.04 LTS.

thunar file manager in Xubuntu 12.04

Note: The solution isn't permanent. Whenever you open a file in Gedit or something like that, The drive icon all appears again. To permanently disable this, follow the below work around.

Workaround to disable this permanently.

Open a terminal and do this command:

sudo mv /usr/lib/gvfs/gvfs-gdu-volume-monitor /usr/lib/gvfs/gvfs-gdu-volume-monitor.bak

This command renamed the culprit file to show the drive icon with adding a .bak extension. That's it.

If you want to revert the change, use this command

sudo mv /usr/lib/gvfs/gvfs-gdu-volume-monitor.bak /usr/lib/gvfs/gvfs-gdu-volume-monitor

Note: This is not a decent solution, but this works perfectly, and I am happy with this.

My drive icon has gone, How can I mount them now

Don't cry. Here is your trusted friend terminal. Open a terminal and do this command to mount /dev/sda1 partition. It will do what nautilus does.

udisks --mount /dev/sda1

To find the /dev/sdaX number of desired partition, do sudo blkid on the terminal.


Update for 12.10

It seems Ubuntu 12.10 is using udisks2 program and the responsible program for showing the drive icon is also changed. It is now gvfs-udisks2-volume. You should kill this process instead of older gvfs-gdu-volume program.

2: 1: http://i.stack.imgur.com/WIjuK.png