https://askubuntu.com/questions/191527/disable-auto-opening-nautilus-window-after-auto-mount
The simplest option is to open a terminal with Ctrl+Alt+T,and type:
gsettings set org.gnome.desktop.media-handling automount-open false
or
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
.