You can make the screen lock automatically whenever a user is idle for some amount of time. This is useful if your users may leave their computers unattended in public or unsecure locations.
Create the user profile which contains the following lines:
local is the name of a dconf database.
Create the directory /etc/dconf/db/local.d/ if it does not already exist.
Create the key file /etc/dconf/db/local.d/00-screensaver to provide information for the local database.
# Specify the dconf path [org/gnome/desktop/session] # Number of seconds of inactivity before the screen goes blank idle-delay=uint32 180 # Specify the dconf path [org/gnome/desktop/screensaver] # Lock the screen after the screen is blank lock-enabled=true # Number of seconds after the screen is blank before locking the screen lock-delay=uint32 0
You must include the uint32 along with the integer key values as shown.
To prevent the user from overriding these settings, create the file /etc/dconf/db/local.d/locks/screensaver with the following content:
# Lock desktop screensaver settings /org/gnome/desktop/session/idle-delay /org/gnome/desktop/screensaver/lock-enabled /org/gnome/desktop/screensaver/lock-delay
Update the system databases:
# dconf update
Users must log out and back in again before the system-wide settings take effect.
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.