If you want to enable the screensaver and make the screen lock automatically when the user is idle, you need to create a dconf profile, set the GSettings key pairs and then lock it to prevent users from editing it.
Create a user profile in /etc/dconf/profile/user:
user-db:user system-db:local
As root, create a local database for system-wide settings in /etc/dconf/db/local.d/00-screensaver:
[org/gnome/desktop/session] # Set the lock time out to 180 seconds before the session is considered idle. idle-delay=180 [org/gnome/desktop/screensaver] # Set this to true to lock the screen when the screensaver activates lock-enabled=true # Set the lock timeout to 180 seconds after the screensaver has been activated lock-delay=180
Override the user's setting and prevent the user from changing it in the /etc/dconf/db/local.d/locks/screensaver file:
# Lock desktop screensaver settings /org/gnome/desktop/session/idle-delay /org/gnome/desktop/screensaver/lock-enabled /org/gnome/desktop/screensaver/lock-delay
Run dconf update.
The following GSettings keys are of interest:
The number of seconds before the session is considered idle.
The number of seconds after screensaver activation before locking the screen.
Set to true to lock the screen when the screensaver goes active.
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.