With Xubuntu 16.04, how do you get it to lock the screen automatically after a number of minutes of inactivity?

Hard to believe I'm asking this, it seems like a basic thing. With other Ubuntu flavors and versions the default has been, screen locks after a certain number of minutes, and the setting is settable, so to speak -- I don't remember exactly where but there's a GUI control for it someplace sensible.

I have searched a lot for the answer but what I've found seems to be dated.

  • I've written an answer on your question. It works perfectly for me. Check it
    – Anwar
    Sep 1, 2016 at 16:11
  • 1
    @anwar gonna give it a try as soon as I get the chance. thank you!
    – David
    Sep 2, 2016 at 17:21
  • Have you tried the solution? Did that work?
    – Anwar
    Sep 5, 2016 at 19:09
  • 1
    OMG, I am embarrassed to admit that i haven't. i've been really busy putting out more urgent fires. I will let you know as soon as I find out myself. :-)
    – David
    Sep 6, 2016 at 17:58
  • OK, Anwar's solution is a winner. Thank you! The only detail is that I didn't have any Settings Manager -> Hardware -> Power Manager, but rather Settings Manager -> Power Manager (no "Hardware" thing).
    – David
    Sep 6, 2016 at 19:54

2 Answers 2


You have to adjust two things for this.

1. Configure the time needed to go for the display in Blank Mode

  1. Open Settings Manager

  2. Go to Hardware Section

  3. Click on Power Manager

  4. Click on Display Tab

  5. There is an option Handle display power management. Enable that option by checking it. And change the timing parameter by using the slider with label Blank After, setting value whatever you want.

    Remember, Less than 1 minute means Never.

Note: If you can't find Power Manager settings under Hardware section, you're missing xfce4-power-manager package. Install it with this command

sudo apt install xfce4-power-manager

Here is the screenshot of the Settings Window

Settings Window

2. Configure the time must pass to active lock

This is controlled by Xscreensaver in Xubuntu.

  1. Open Settings Manager

  2. Go to Personal Section

  3. Click Screensaver

  4. While in Display Modes tab, at the bottom of it, there is a settings with label Lock Screen After [N] minutes. This controls the time required for the Lock to active after screen goes blank.

    So, the calculation is, The time needed for the display to go blank + the time needed for the lock to be activated. (I set this 0)

Adjust this settings. Then wait for the display to go blank. Wait the time to active lock. There will be lock now.

Here is a picture of the settings window of it.

Xscreensaver preference

Hope this answers the question.

  • This shows xscreensaver, but the default screensaver is light-locker. My experience is that behavior is nondeterministic. After setting both light-locker and xfce power manager settings, I sometimes find that the screen stays on overnight. I can easily fix that by running "light-locker-command -l" or clicking "lock screen" from the main xfce menu, but it won't consistently work automatically. Maybe could you describe how to uninstall light-locker and install xscreensaver?
    – jrennie
    Feb 8, 2017 at 1:28
  • I tried following these instructions but they don't work. There is no 'ScreenSaver' under setting in 16.04 though there is 'Light Locker Settings'. Enabling that (as well as in the Power Manager) does nothing.
    – Chris Dodd
    Feb 15, 2017 at 16:22
  • Your Display setting could be in "Presentation Mode". Determine if this is the case by selecting the "Show system tray icon" option in Xfce Power Manager settings' General tab, and then clicking on it in the system tray. That was (correctly) preventing my screen saver from activating. Hth! Oct 23, 2017 at 23:48

This setting is at Xfce Power Manager on the Security tab.

XScreenSaver also has an option to lock the screen after x minutes independent of the screensaver being activated. This setting is under the tab Display Modes in the bottom left.

  • 1
    Xubuntu 16.04 sets "Automatically lock the session" to Never by default. Change Never to When the screensaver is activated for locking screen automatically after timeout. Tested working in freshly installed Xubuntu 16.04.
    – user37165
    Aug 31, 2016 at 16:28
  • 1
    Anyone, please explain why this answer was downvoted? This answer is correct, just lacking the steps I had explained in my earlier comment.
    – user37165
    Sep 1, 2016 at 13:45
  • @clearkimura Thank you! I merely pointed to the right place where this setting could be found. I probably should have provided more details, but I considered the rest to be fairly self-explanatory. I also was following the context of the question asked, "I don't remember exactly where but there's a GUI control for it someplace sensible." And, I mentioned where the "GUI control" was for it.
    – jbrock
    Sep 1, 2016 at 22:56
  • The Xfce Power Manager setting works only, if light-locker is used (and no XScreenSaver). Test it by light-locker-command -q which should not display "** Message: Locker is not running!". Make it run by light-locker. Also make it autorun at startup by tuning "Session and Startup" settings. If you do not use XScreenSaver, uninstall it.
    – jarno
    Jul 20, 2018 at 10:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .