Debian GNU/Linux · Desktop environment

Lock GNOME sessions after a short inactivity delay

When it fails: Users can extend or disable the GNOME inactivity lock. An unattended GNOME session stays usable by anyone in front of the screen for as long as the user configured.

CB-DEB-DESK-003mediumactiveautomatedautomated fixprofile desktop

As released in v0.1.0 beta · pre-release. Current state.

Description

Two GNOME keys control when an idle session gets locked:

  • org.gnome.desktop.session idle-delay: seconds of inactivity before the session is considered idle and the screen blanks;
  • org.gnome.desktop.screensaver lock-delay: seconds between the screen blanking and the lock.

Both are set in the system dconf database local and locked. The lock itself requires lock-enabled, set by CB-DEB-DESK-009.

Debian's defaults are already 300 and 0 seconds, but users can change them. The check expects exactly the configured values. dconf read as root reads the system database, which wins over user values for locked keys.

Rationale

A session left open on an unattended machine gives its access to anyone passing by. Locking after a short delay limits that window, and locking the keys stops users from disabling it.

Impact

Sessions lock after {{ idle_delay }} seconds of inactivity, plus {{ lock_delay }} seconds. Users cannot change these delays. Presentations and video calls inhibit the idle delay while they run.

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/, keys /org/gnome/desktop/session/idle-delay and /org/gnome/desktop/screensaver/lock-delay
Default300 and 0 seconds, not locked
Recommendedidle-delay=uint32 {{ idle_delay }}, lock-delay=uint32 {{ lock_delay }}, locked

Parameters

ParameterCoreServerServer hardenedDesktopDesktop hardenedBounds
idle_delayinteger, seconds. Seconds of inactivity before the screen blanks. 0 would disable the lock.3003003003003001 to 900
lock_delayinteger, seconds. Seconds between the screen blanking and the lock.000000 to 5

The value used is your override (tailoring file), else the profile's, else the one of the profile it extends, else the default. Bounds limit what an override may set.

Audit

  1. dconf read /org/gnome/desktop/session/idle-delay must print uint32 {{ idle_delay }}.
  2. dconf read /org/gnome/desktop/screensaver/lock-delay must print uint32 {{ lock_delay }}.
  3. Both keys 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.

idle-delay

Inactivity delay before the screen blanks.

key: /org/gnome/desktop/session/idle-delay
value: uint32 {{ idle_delay }}

lock-delay

Delay between blanking and locking.

key: /org/gnome/desktop/screensaver/lock-delay
value: uint32 {{ lock_delay }}

Remediation

  1. Make sure /etc/dconf/profile/user contains user-db:user and system-db:local.
  2. Create /etc/dconf/db/local.d/00-screen-lock:
    [org/gnome/desktop/session]
    idle-delay=uint32 {{ idle_delay }}
    
    [org/gnome/desktop/screensaver]
    lock-delay=uint32 {{ lock_delay }}
    
  3. List /org/gnome/desktop/session/idle-delay and /org/gnome/desktop/screensaver/lock-delay in /etc/dconf/db/local.d/locks/00-screen-lock.
  4. Run dconf update.
Restartusers must log in again
Disruptionlow

Rollback

Delete the files written in /etc/dconf/db/local.d/ and its locks/ directory, then run dconf update.

idle-delay

Generated from check idle-delay: the engine writes the fix for every output, it sets the expected value and the check runs again after.

lock-delay

Generated from check lock-delay: 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

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R32partialR32 covers every local session; this control covers GNOME, CB-DEB-DESK-008 the others.
NIST SP 800-53 Rev. 55.1.1AC-11equivalent

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

  • requires CB-DEB-DESK-009 Lock the session when the screen saver starts and when the system suspends
  • related CB-DEB-DESK-008 Lock idle sessions outside GNOME, through logind and the KDE screen locker

People and lifecycle

Authors
Verified2026-10-18 by Sn0wAlice on 12, Proxmox VM with minimal GNOME (gdm3, gnome-shell), Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64. Generated dconf check and fix (desktop-hardened) on GNOME; values and locks confirmed with gsettings as a user (write refused); state kept after reboot.
Verified2026-10-18 by Sn0wAlice on 13, Proxmox VM with minimal GNOME (gdm3, gnome-shell), Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64. Generated dconf check and fix (desktop-hardened) on GNOME; values and locks confirmed with gsettings as a user (write refused); state kept after reboot.
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr