68

I am using Ubuntu 11.10 (64 bits) and I do not want to mount automatically USB thumb drives in my system. I tried the command dconf-editor and gconf-editor but there isn't the icon to disable it in nautilus preferences (apps|nautilus|preferences|media_automount).

Thanks.

sum2000
  • 1,236
  • 10
  • 12
khyale
  • 681
  • 1
  • 6
  • 3

4 Answers4

86

From the command line

To disable Nautilus automount use this command in a terminal

gsettings set org.gnome.desktop.media-handling automount false

To enable it again open a terminal and use this command

gsettings set org.gnome.desktop.media-handling automount true

From the GUI

You first need to install dconf editor in Software Center. In my case it shows remove because I have already installed it

enter image description here

Then you need to open dconf editor via Dash

enter image description here

Then goto org.gnome.desktop.media-handling

You will find automount checkbox on right hand side. Uncheck it

enter image description here

mwfearnley
  • 3,317
  • 2
  • 22
  • 28
Manish Sinha
  • 11,565
  • 16
    I have "defaced" you answer with terminal instructions just in case a user does not want to install dconf-tools in his system, hope that is OK with you. – Bruno Pereira Feb 09 '12 at 09:43
  • @ManishSinha Where can I find the setting in Ubuntu 14.04.? – JJD Nov 27 '14 at 12:54
  • 2
    @BrunoPereira +1, good job, personally I didn't want to install a GUI tool for such simple task :) – dariush Sep 21 '15 at 08:51
  • This didn't work via ssh, I got dconf-WARNING **: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY – Stefan Dec 21 '16 at 11:43
12

Install dconf-tools, and run dconf-editor. Then see in dconf-editor, key

org.gnome.desktop.media-handling/automount
RolandiXor
  • 51,541
enzotib
  • 93,831
4

I believe you can find dconf-editor is part of dconf-tools. If you search for dconf, it should show up.

The key is under org. As posted, dig down to org.gnome.desktop.media-handling/automount.

Nephente
  • 5,595
  • 1
  • 17
  • 23
2

I'm copying Bruno Pereira's edit into its own answer, since because it doesn't involve installing any additional GUI tools, it's probably the most desirable option for most people.


If you prefer not to install anything extra in your system. You can use gsettings to change dconf keys.

To disable Nautilus automount use this command in a terminal

gsettings set org.gnome.desktop.media-handling automount false

To enable it again open a terminal and use this command

gsettings set org.gnome.desktop.media-handling automount true
mwfearnley
  • 3,317
  • 2
  • 22
  • 28