Want to lock Linux automatically while preventing from going blank screen when you’re not at the computer?
For Gnome user in Ubuntu, Fedora, Debian, CentOS, etc., it’s easy to implement the job via extension.
By default, Gnome turns off computer screen after a few minutes of inactivity. Then it locks the session automatically and later goes suspend if enabled.
With “Unblank lock screen” extension, it will break the ‘Blank Screen’ action you set in Power Settings. Instead, when system reached the idle timeout, it goes to lock screen and keep the screen display. And it stops automatic suspend with the extension enabled.
Install Unblank lock screen Extension:
For Ubuntu users, you need to first open terminal (Ctrl+Alt+T) and run command to install the package for GNOME Shell extensions integration for web browsers:
sudo apt install chrome-gnome-shell gnome-shell-extension-prefs
Next, go to the extension web page by clicking on the link button below. And turn on the toggle icon to install it:
The extension so far works on all current Gnome versions, including Gnome 40. If you don’t see the slider icon, don’t worry click to install browser extension via “click here to install browser extension” link and REFRESH the web page.
Change the settings:
The extension works immediately after you installed it. However, you can click “Activities“, search and open ‘Gnome Extensions App’ to change its settings.
When it opens, click on the gear button after the extension. Then you’ll see the options to:
- toggle on / off the main function.
- Only un-blank lock screen when on battery.
- Set a timeout (30, 60, 90, or 120 mins) if you want to close the monitor.
That’s all. Enjoy!