Description
org.gnome.desktop.media-handling autorun-never set to true stops GNOME from prompting
for or launching programs when media are inserted. The key is set in the system dconf
database local and locked.
Ubuntu 24.04 and 26.04 (GNOME 46 and 50) already default to true; 20.04 and 22.04 (GNOME
3.36 and 42) default to false. In every version, users can change
it unless the key is locked.
Rationale
Autorun turns the insertion of a medium into code execution with one click, or none if the user chose "always". It is a classic infection path for removable media.
Impact
Users open media content themselves from the file manager.
Applies when
Detected: when: GNOME desktop is installed A scanner reports the control not applicable when one is false.
Setting
| Location | /etc/dconf/db/local.d/, key /org/gnome/desktop/media-handling/autorun-never |
| Default | false (20.04, 22.04), true (24.04, 26.04), not locked |
| Recommended | true, locked |
Audit
dconf read /org/gnome/desktop/media-handling/autorun-nevermust printtrue.- The key must be listed in a file of
/etc/dconf/db/local.d/locks/.
Automated: every check must pass. Scanners report each check by its id.
autorun-never
GNOME never runs software from inserted media.
key: /org/gnome/desktop/media-handling/autorun-never
value: 'true'
Remediation
- Make sure
/etc/dconf/profile/usercontainsuser-db:userandsystem-db:local. - Create
/etc/dconf/db/local.d/00-media-autorun:[org/gnome/desktop/media-handling] autorun-never=true - List
/org/gnome/desktop/media-handling/autorun-neverin/etc/dconf/db/local.d/locks/00-media-autorun. - Run
dconf update.
| Restart | users must log in again |
| Disruption | none |
Rollback
Delete the files written in /etc/dconf/db/local.d/ and its locks/ directory, then run
dconf update.
autorun-never
Generated from check autorun-never: the engine writes the fix for every output, it sets the expected value and the check runs again after.
Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.
References
- gsettings-desktop-schemas - org.gnome.desktop.media-handling schema The GNOME Project, vendor-doc, accessed 2026-10-19
- GNOME System Administration Guide - Lock down specific settings The GNOME Project, vendor-doc, accessed 2026-10-19
Mappings
| Framework | ID | Relation |
|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID |
|---|---|
| MITRE ATT&CK | T1091 |
Related controls
- related
CB-UBU-DESK-001Disable automatic mounting of removable media in GNOME
People and lifecycle
| Authors |
|
| Verified | 2026-10-19 by Sn0wAlice on 20.04, Proxmox VM with Ubuntu Desktop (GNOME 3.36, gdm3), Ubuntu 20.04.6, kernel 5.4.0-216-generic. Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 22.04, Proxmox VM with Ubuntu Desktop (GNOME 42, gdm3), Ubuntu 22.04.5, kernel 5.15.0-198-generic. Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 24.04, Proxmox VM with Ubuntu Desktop (GNOME 46, gdm3), Ubuntu 24.04.5, kernel 6.8.0-147-generic. Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 26.04, Proxmox VM with Ubuntu Desktop (GNOME 50, gdm3), Ubuntu 26.04.1, kernel 7.0.0-38-generic. Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |