When I step away from my Linux computer for a while, the system locks and I have to enter my password to unlock it.

How can I change the time before the system locks?

I've hunted through all the GUI menus and haven't found anything. There are some settings in /etc/login.defs but they all seem to apply to logging on to the system and not to timing out after the initial login.

I'm running Linux Mint 10. I'm also testing some other distros (Debian, OpenSuse, Fedora, PCLinuxOS, and Arch), so I'm looking for both distro-specific and general solutions.

  • I'm pretty sure this is a GNOME thing, because it doesn't happen on the Kubuntu system I'm currently using.
    – user55325
    Apr 7, 2011 at 5:06

8 Answers 8


On Ubuntu 10 running Gnome:

System -> Preferences -> Screensaver. There's a checkbox to lock after the screensaver activates, and there's checkbox and a slider to activate the screensaver after a certain amount of time.

  • 2
    And I just found that on Linux Mint, it's under Preferences -> Screensaver. There's a slider to adjust how long before the screensaver is active, and a tick box for 'Lock screen when screensaver is active'. Apr 8, 2011 at 2:26
  • Ubuntu 20.04 - Settings > Privacy > Screen Lock
    – Alex 75
    Jul 8, 2020 at 15:09

On Fedora Core 18 (Gnome)

Using the GUI tools:

Applications > System Tools > System Settings > Brightness & Lock

From the terminal (to set sleep timeout to 10 minutes / 600 seconds, then require login after 15 minutes / 900 seconds):

gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 600
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 600
gsettings set org.gnome.desktop.session idle-delay 600
gsettings set org.gnome.desktop.screensaver idle-activation-enabled 'true'
gsettings set org.gnome.desktop.screensaver lock-enabled 'true'
gsettings set org.gnome.desktop.screensaver lock-delay 900

On Debian 8 (jessie) it's in "Settings/Privacy". (press Alt-F1 and type "settings"). To run it from somewhere else, name of the application is "gnome-control-center".

  • This is what I was looking for. Thanks a lot!
    – Arefe
    Dec 20, 2017 at 1:09

On Debian (release 7.4 = wheezy):

The problem with lock/timeout/idle/gnome-screensaver is resolved on a standard install, thru the menu "Applications" in the lowest-leftest corner,

Applications > System Tools > Preferences > System Settings > Brightness and Lock

or thru the menu (with your name) in the lowest-rightest corner,

System Settings > Brightness and Lock

Here, I changed "10 minutes" to "1 hour"; and I changed "Lock ON" to "Lock OFF" (so the screen blanks but doesn't require another login)

The Debian package that instituted this is gnome-screensaver


For Centos 7 running MATE GUI, it's in the menu under System -> Preferences -> Look and Feel -> Screensaver. You can turn it off from here, as well as locking the screen when computer is idle. Also, there is Power Management button in the bottom toolbar of Screensaver preferences windows where you can change additional settings like dimming the screen, turning it off after certain time, etc.


For Fedora 14, it is in the screensaver settings under something like "require password to return from screensaver." I don't remember the exact phrasing as I am not booted in fedora at the moment.

EDIT: I am running GNOME with Fedora 14.


On Centos 7 gui
To prevent screen from locking:
Applications (upper left hand corner of desktop) → System Tools → Settings → Privacy → Left click on Screen Lock → Lock screen after blank for, drop down menu

To prevent screen from going black:
Applications → System Tools → Settings → Power → Blank Screen


For Leap 42.x. If you are using Gnome, go to Activities | Show Applications | Settings | Power | Power Saving. Change it to the number of minutes you desire or simply make it Never.

  • OP said it is the Screensaver timing not power options
    – yass
    Jun 3, 2017 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.