翻訳されたメッセージ

A translation of this page exists in Japanese.

How to disable media automount in GNOME

Solution 確認済 - 更新日時 -

環境

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • GNOME

問題

  • How can I disable the cd/dvd automount feature in GNOME?
  • How to disable automount of removable media in GNOME ?

解決策

Media auto-mount can be disabled by using following methods.

RHEL 7, RHEL 8, RHEL 9

To disable it per user:

  • Open dconf-editor and goto org > gnome > desktop > media-handling and uncheck automount and automount-open checkbox on right hand side pane.
  • Alternatively, use the command below :

    # gsettings set org.gnome.desktop.media-handling automount false
    # gsettings set org.gnome.desktop.media-handling automount-open false 
    # systemctl restart gdm.service
    

To disable it for all users :

  • Create a file /etc/dconf/db/local.d/00-media-automount with following content:

    # cat /etc/dconf/db/local.d/00-media-automount
    [org/gnome/desktop/media-handling]
    automount=false
    automount-open=false
    
  • After creating the file, apply the changes using below command :

    # dconf update
    

RHEL6

To disable it per user:

  • Open System->Preferences->File Management Preferences->Media .
  • Alternatively, use the command below:

    $ gconftool-2 --type bool --set /apps/nautilus/preferences/media_automount false
    $ gconftool-2 --type bool --set /apps/nautilus/preferences/media_automount_open false
    

To disable it for all users :

  • Run the command below:

    # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory -s /apps/nautilus/preferences/media_automount -t bool false
    # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory -s /apps/nautilus/preferences/media_automount_open -t bool false
    

RHEL5

To disable it per user:

  • Open System->Preferences->Removeable Drives and Media Preferences .
  • Alternatively, use the command below:

    $ gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_drives false
    $ gconftool-2 --type bool --set /desktop/gnome/volume_manager/automount_media false
    

Comment

このソリューションは、Red Hat のエンジニアがお客様のサポート中に作成したナレッジコンテンツの大型ライブラリーを提供する Fast-Track Publication Program の一環です。お客様が必要とする知識・情報を即時に提供するために、これらの記事は、未処理・未編集の状態で提示される場合がありますので、予めご了承ください。

コメント