Don’t open new window when mounting USB key [duplicate]

The simplest option is to open a terminal with Ctrl+Alt+T, and type:

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

Turns out, it is. You will need dconf-editor tool, which can be installed by with sudo apt-get install dconf-tools. Run dconf-editor in your terminal. Browse to org -> gnome -> desktop - media-handling. Uncheck automount-open.


The setting corresponding to izx's to disable automatically launching nemo in the cinnamon desktop is:

gsettings set org.cinnamon.desktop.media-handling automount-open false

For MATE Desktop Environment, which uses the Caja file manager:

gsettings set org.mate.media-handling automount-open false

or use Caja File Management Preferences (caja-file-management-properties) - on Media tab uncheck Browse media when inserted checkbox.

Not for Gnome or Cinnamon desktop environments, however MATE/Caja is a close relative.