How do I disable the GNOME desktop screen lock? [closed]
Asked Answered
B

3

13

How do I stop my GNOME desktop from locking the screen after a few minutes of idle time?

I already tried the official manual at Red Hat and tried to use gconf-editor and gconftool-2 to set /apps/panel/global/disable_log_out and /apps/panel/global/disable_lock_screen. No luck.

Bacillary answered 2/2, 2015 at 15:28 Comment(1)
If you are using a more current Linux running Gnome 3.x you'll want to be using gsettings rather than gconftool-2.Vaginectomy
B
4

The screen saver can also lock the screen. Uncheck either 'Activate screensaver when computer is idle' or 'Lock screen when screensaver is active' or both in screensaver preferences. From commandline use gnome-screensaver-preferences or goto 'System->Preferences->Screensaver'.

I think the corresponding keys (for use with gconftool-2) are /apps/gnome-screensaver/idle_activation_enabled and /apps/gnome-screensaver/lock_enabled.

HTH

Bacillary answered 2/2, 2015 at 15:28 Comment(0)
V
35

On newer distributions of Linux, like Red Hat and CentOS 7, which run GNOME 3.x you'll want to disable this via the gsettings utility rather than gconftool-2. The default is 5 minutes before the system is considered idle. Setting the value to 0 disables this.

gsettings set org.gnome.desktop.session idle-delay 0

This setting can also be made in the GUI dconf-editor from a logged in session of the user in question.

From the standard System ToolsSettings application, there is also a "Blank Screen" option in the power settings which may provide the same behavior as the gsettings command given previously. In my testing, setting the "Screen Lock" to "Off" in the privacy settings DID NOT disable the screen blanking after 5 minutes.

On a final note, you cannot run that gsettings command from a remote SSH session without getting errors. See the last reference link below.

It was quite a research effort to get this disabled on my virtual machine!

References:

Vaginectomy answered 4/6, 2017 at 20:3 Comment(4)
Works great! On a side note, the value is in seconds, so resetting it to 5 minutes would be gsettings set org.gnome.desktop.session idle-delay 300Hukill
Is there a way to query the current value from the commandline too?Mireille
@Mireille sorry I don't know offhand. I assume you tried gsettings get ... but other than that it's been awhile since I wrote this and I'm not a gesettings expert!Vaginectomy
If you have Anaconda installed, make sure you use /usr/bin/gsettings, by default gsettings might run /home/USER/anaconda3/bin/gsettings.Interlocutress
K
7

The gconf schema entry for this in /etc/gconf/schemas/desktop_gnome_lockdown.schemas, and it would seem to be that the following command would disable the GNOME desktop lock screen:

 gconftool-2 --set /schemas/desktop/gnome/lockdown/disable_lock_screen --type boolean true

However, in reality it seems that no attention is paid to this parameter (in OL 7.2 anyways).

An effective, but clumsy, workaround is to navigate in the GUI to ApplicationSystemToolsSettingsPower and set PowerSaving Blank Screen to "Never".

Khania answered 29/2, 2016 at 15:31 Comment(0)
B
4

The screen saver can also lock the screen. Uncheck either 'Activate screensaver when computer is idle' or 'Lock screen when screensaver is active' or both in screensaver preferences. From commandline use gnome-screensaver-preferences or goto 'System->Preferences->Screensaver'.

I think the corresponding keys (for use with gconftool-2) are /apps/gnome-screensaver/idle_activation_enabled and /apps/gnome-screensaver/lock_enabled.

HTH

Bacillary answered 2/2, 2015 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.