When using the GNOME desktop environment in Linux, the desktop screen lock feature helps to secure our computer by prompting us to input our password again after a certain period of inactivity. However, it can also be a nuisance, especially when we’re working on a task that requires constant access to our computer.
In this tutorial, we’ll discuss two methods that are useful for disabling the GNOME desktop screen lock. First, we’ll explain how to disable this feature from the terminal using the gsettings command. Then, we will look at disabling it using the graphical user interface (GUI).
2. Using the gsettings Command
The gsettings command is a powerful tool that allows users to view, modify, and manipulate various settings within the GNOME desktop environment. Among other settings, we can use it to modify those controlling the desktop screen lock.
This command follows a general syntax:
$ gsettings <command> <schema> <key> [<value>]
The options collaborate with the gsettings command to customize the output:
- command – specifies the action we want to perform, such as get to retrieve a value or set to modify a value
- schema – refers to the collection of keys that are used to configure a particular component in Gnome like the screensaver, power management, or desktop backgrounds
- key – defines the setting we want to view or modify within the specified schema
- value – specifies the new value we want to assign to the specified key, which is only used when the set command has been used
Now, let’s put this knowledge to use. First, before disabling the desktop screen lock, we’ll start by checking the status of the screen lock setting:
$ gsettings get org.gnome.desktop.screensaver lock-enabled true
The output of true shows that the desktop screen lock is currently enabled on our computer.
So, let’s go ahead and disable it:
$ gsettings set org.gnome.desktop.screensaver lock-enabled false
The command above successfully disables the desktop screen lock on a machine that utilizes the GNOME desktop environment. Now, the screen will not lock after a certain period of inactivity and prompt the input of a password to access our computer.
In some cases, we might decide to re-enable the desktop screen lock after we’re finished working on our task:
$ gsettings set org.gnome.desktop.screensaver lock-enabled true
The above command re-enables the desktop screen lock feature on our computer.
3. Using the GUI
Alternatively, we can use the graphical user interface to disable the screen lock feature. Similar to the previous section, we’ll concentrate on the GNOME desktop environment.
First, let’s begin by clicking on the Activities button found in the top left corner of our screen:
As a result, a search bar appears on our screen.
Now, we’ll search for Settings on our computer and click on it:
Once we’re in the Settings application, we’ll go ahead and select the Privacy menu from the left-hand side of the screen. After that, we’ll click on the Screen menu:
On the right side of the screen, we see an option named Automatic Screen Lock that has a toggle switch next to it. So, let’s go ahead and click on the toggle switch to turn the Automatic Screen Lock off:
We’ve successfully disabled the desktop screen lock using the GUI. Now our desktop screen will no longer lock automatically after a certain period of inactivity.
In this article, we explored disabling the desktop screen lock feature specific to the GNOME desktop environment. We explained how to disable it through the terminal and also the graphical user interface. However, it’s important to note that disabling the desktop screen lock feature can compromise the security of our computer, as it removes an important layer of protection against unauthorized access.