This question already has an answer here:

I usually charge my phone through a USB connection. Due to Ubuntu 13.04 detecting and mounting it, Nautlius automatically opens the mounted folder. Can I stop Nautlius from automatically opening the folder of some mounted devices?

marked as duplicate by Warren Hill, karel, bain, Richard, nux Jul 8 '14 at 9:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    On Xubuntu, I do xfconf-query -c thunar-volman -p /automount-drives-enabled -s false but I heavily suspect it won't work in "plain" Ubuntu, because this command recalls XFCE and Thunar. – ignis May 2 '13 at 21:04

Click on Applications->System Tools->dconf Editor

In the window which opens, Select org from the side bar, then gnome and then desktop and then media-handling Uncheck the automount-open from the right side bar.

See the picture.

enter image description here

  • Thank you. But can I also change it for one device only? – MeinAccount May 2 '13 at 18:27
  • worth noting that you have to do this as the user you're logged in as, not neccessarily root – stu Sep 17 '15 at 13:26
  • You're a life saver! – Akbar Sha Ebrahim Mar 2 '16 at 12:58
  • @MeinAccount – someone at least ‘solved’ this by id-speficic unmount scripts... – Frank Nocke Feb 25 '17 at 7:20

Install Ubuntu Tweak. Open it up. Go to Tweaks -> File Manager and you'll see the option there.

Not the answer you're looking for? Browse other questions tagged or ask your own question.