Ubuntu12.04禁止U盘等设备的自动挂载方法如下:
在图形界面(字符界面无效)内进入系统终端,ctrl+alt+T或者gnome-terminal
禁止自动挂载:
$ gsettings setorg.gnome.desktop.media-handling automount false
禁止自动挂载并打开:
$ gsettings setorg.gnome.desktop.media-handling automount-open false
允许自动挂载:
$ gsettings set org.gnome.desktop.media-handlingautomount true
允许自动挂载并打开:
$ gsettings setorg.gnome.desktop.media-handling automount-open true