The maximum lock time in Ubuntu 18.04, when set via GUI, is 15 minutes. This can be set in Settings → Power → Power Saving → Blank screen.
I'd like to increase this to 30 minutes for my machine at home. How can I do that?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityThe maximum lock time in Ubuntu 18.04, when set via GUI, is 15 minutes. This can be set in Settings → Power → Power Saving → Blank screen.
I'd like to increase this to 30 minutes for my machine at home. How can I do that?
Open Terminal and run:
gsettings set org.gnome.desktop.session idle-delay 1800
to set the "Blank screen" delay to 30 minutes or 1800 seconds (or set any value in seconds). You can use $((30*60))
to use minutes directly.
Note: After making the change, in Settings → Power → Power Saving → Blank screen it will show "Never" as there is no entry for 30 minutes.
To lock: The number of seconds after blank screen activation before locking the screen (default: 0)
gsettings set org.gnome.desktop.screensaver lock-delay 0
Needed: Set this to TRUE (default) to lock the screen when the blank screen goes active
gsettings set org.gnome.desktop.screensaver lock-enabled true
get
current idle-delay
: gsettings get org.gnome.desktop.session idle-delay
The timeout for locking the screen after it goes blank can be achieved via GUI.
When using Ubuntu 18.04 open Settings. There select the Privacy settings tab. Now the Screen Lock option will be visible. When clicked, a modal window with the specific settings will open.
There you can toggle Automatic Screen Lock on/off, set a time for locking the screen or respectively binding it to the screen turning off via Lock screen after blank for, last but not least Show Notifications lets you decide if notifications should be shown on the lock screen.
So the path for the option you want to change is:
Settings → Privacy → Screen Lock → Lock screen after blank for
There you can select 30 minutes as the lock screen time.
lock-delay 0
– and keep screen on for 30 minutes, or some other time, before the blank screen – idle-delay 1800
; basically @pomsky 's answer. (This allows me to read from the screen during those 30 minutes.)
There are 2 different settings, one for blank screen and second for locking screen after blank.
In GUI: Settings → Power → Power Saving → Blank screen
In Terminal:
gsettings set org.gnome.desktop.session idle-delay 1800
to set the "Blank screen" delay to 30 minutes or 1800 seconds (or set any value in seconds).
Note: After making the change, in Settings GUI editor it will show "Never" as there is no entry for 30 minutes.
In GUI: Settings → Privacy → Screen Lock → Automatic Screen Lock Delay
In Terminal:
gsettings set org.gnome.desktop.screensaver lock-delay 600
to set the "Lock screen after blank for" delay to 10 minutes or 600 seconds (or set any value in seconds). Set 0 to lock immediately after blank screen.
Combining these 2 parameters user is able to achieve for example:
To set Blank Screen as "never" on Ubuntu 20.04, you should use:
gsettings set org.gnome.desktop.session idle-delay 0
Settings > Power > ...
, got toSettings > Privacy > Screen Lock
, as described by Nicolai below. On 20.04 you'll see select boxes for both "Blank Screen Delay" and "Automatic Screen Lock Delay". Although the options are still very limited, this does allow you to set e.g. a 30 minute or 1 hour delay until the screen actually locks.