Tested with Red Hat Enterprise Linux 6.9.
When inserting (USB) storag into a Red Hat Linux system all logged in users on the (default) Gnome desktop receive the following message:
To disable:
sudo /usr/bin/gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --get /apps/nautilus/preferences/media_automount
This will show as “No value set for `/etc/gconf/gconf.xml.mandatory`” right after installation.
sudo /usr/bin/gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool --set /apps/nautilus/preferences/media_automount false
Sources:
According to LinuxQuestions.org - RHEL 6 - Disable Gnome DVD Automount this works on Red Hat Enterprise Linux 5:
/usr/bin/gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool --set /desktop/gnome/volume_manage/automount_media false /usr/bin/gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool --set /desktop/gnome/volume_manager/automount_drives false