[sles-beta] Disabling auto mounting of DVD/CD

Frederic Crozat fcrozat at suse.com
Mon Aug 4 02:27:14 MDT 2014


Le vendredi 01 août 2014 à 22:26 +0000, Harold Longley a écrit :
> For SLES11SP3 and earlier, I was able to use the commands below to
> prevent the auto mounting of a DVD/CD.  I added these commands to a
> post-script in my autoinst.xml file.
> 
> 
> How can this be done with SLES 12?  There is no /apps/nautilus in my
> installed system.  I tried these commands, but they did not have the
> desired effect.
> 
> 
> #
> # Fix up the gnome/nautilus desktop configuration to prevent icon
> autocreation and
> # automounting of detected filesystems.
> #
> 
> 
> gconftool-2
> --config-source=xml:readwrite:/etc/gconf/gconf.xml.mandatory --direct
> --type bool -s /apps/nautilus/preferences/media_automount false
> gconftool-2
> --config-source=xml:readwrite:/etc/gconf/gconf.xml.mandatory --direct
> --type bool -s /apps/nautilus/preferences/media_automount_open false
> gconftool-2
> --config-source=xml:readwrite:/etc/gconf/gconf.xml.mandatory --direct
> --type bool -s /apps/nautilus/preferences/media_autorun_never true
> gconftool-2
> --config-source=xml:readwrite:/etc/gconf/gconf.xml.mandatory --direct
> --type bool -s /apps/nautilus/desktop/volumes_visible false

Those old keys should be automatically handled (thanks to GConf to
gsettings mapping) but the new keys should be set this way:
(the how-to is from
https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en )

-to set the default values, create
file /etc/dconf/db/local.d/00-defaults containing :
[org.gnome.desktop.media-handling]
automount=false
automount-open=false
autorun-never=false

[org.gnome.nautilus.desktop]
volumes-visible=false

- then you need to lock them, by
creating /etc/dconf/db/local.d/locks/defaults containing:
/org/gnome/desktop/media-handling/automount
/org/gnome/desktop/media-handling/automount-open
/org/gnome/desktop/media-handling/autorun-never
/org/gnome/nautilus/desktop/volumes-visible

- and you need to create/update dconf database by running:
dconf update (as root)


-- 
Frederic Crozat
Project Manager Enterprise Desktop
SUSE



More information about the sles-beta mailing list