Don't automatically open the folder of mounted devices [duplicate]
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.
Install Ubuntu Tweak. Open it up. Go to Tweaks
-> File Manager
and you'll see the option there.