xubuntu 16.04: how do I make it lock screen automatically after timeout

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.


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.