For security purposes, Ubuntu is configured by default to lock your screen and demand your user password whenever your computer goes to sleep or the screen saver activates. While this is essential for a laptop used in public coffee shops or a shared office environment, it can be incredibly frustrating if you are running a desktop computer in the privacy of your own secure home. If you want instant access to your machine without typing a password every time you wiggle the mouse, you can disable the lock screen.
How to Disable the Screen Lock via GUI Settings
The easiest way to turn off the lock screen is through the main Ubuntu Settings application.
- Click the system menu in the top right corner of your screen (where the battery, volume, and network icons are located).
- Select Settings from the dropdown menu.
- In the left-hand sidebar, click on Privacy.
- In the main window, click on Screen Lock.
- Look for the toggle switch labelled Automatic Screen Lock. Click the toggle to turn it Off.
- In the same menu, you can also change the Blank Screen Delay to Never if you do not want your monitor to turn off when idle.
Your Ubuntu machine will no longer lock itself automatically.
How to Disable the Screen Lock via Terminal (dconf)
If you prefer using the command line or are managing a machine remotely, you can achieve the exact same result by altering the GNOME desktop settings using the gsettings command.
- Open your terminal (press Ctrl + Alt + T).
- To disable the automatic screen lock entirely, run the following command:
gsettings set org.gnome.desktop.screensaver lock-enabled false - If you also want to stop the screen from turning off (blanking) when idle, run:
gsettings set org.gnome.desktop.session idle-delay 0
These commands write directly to the dconf database, and the changes take effect immediately without requiring a system reboot.