Friday, September 10, 2010

Disable Nautilus on KDE automount

After installing KDE on Ubuntu 10.04, there were some challenges. One of it is that the USB disk when plugged in, opens (mount) automatically and launches the Gnomes Nautilus. This is not a real problem but when you are used to KDE's environment, the preferred File browser is either Konqueror or Dolphin. In this case, I choose Dolphin.

The most likely cause is that Gnome's GVFS is running and opens the disk automatically. Doing a "ps aux" you will find the following processes running;

/usr/lib/gvfs/gvfsd-trash --spawner :1.39 /org/gtk/gvfs/exec_spaw/0 /usr/lib/gvfs/gvfs-gdu-volume-monitor /usr/lib/gvfs/gvfsd-burn --spawner :1.39 /org/gtk/gvfs/exec_spaw/1 /usr/lib/gvfs/gvfs-afc-volume-monitor /usr/lib/gvfs/gvfs-gphoto2-volume-monitor /usr/lib/gvfs/gvfsd-metadata /usr/lib/gvfs/gvfsd

What is GVFS?
GVFS replaces Gnome's virtual file system (VFS). Programmes built with the library GIO or Gnome I/O will be invoke automatically and managed by the gvfsd service.

The gvfs-fuse module is used only when the application is not built with the GIO library. With GVFS, Nautilus takes over the automount/autorun responsibilities from gnome-volume-manager. A good read on GVFS is in this 2006 article.

Stopping processes
If I stop (kill) the gvfsd and gvfs-gdu-volume-monitor, Nautilus does not get open anymore. But instead of killing this process, I will approach this by assuming that gvfs reads from Gnome Desktop Manager configuration files.

Step 1:
Open a terminal (e.g. konsole) and type

Step 2:
In the left window of Gconf-editor, choose /apps/nautilus/preferences and remove check mark for
1) media_automount
2) media_automount_open

Step 3:
Close the Gconf-editor and log out. After you log back in, no more Nautilus.

1 comment:

Anonymous said...

Thank you, my savior!
I cannot understand what that annoying window is doing in Gnome at all. I mean come on, is a pop-up window the best solution Linux desktop has to offer regarding USB drives? When I plugged-in my phone I used to get four such pop-up windows, two for each volume. No matter how imperfect the KDE's system tray is, it cannot be worse than pop-up windows...

Blog Archive