I'd like xscreensaver to lock my session using the standard GNOME lockscreen, instead of using the horrible 1990's xscreensaver lockscreen prompt (sorry guys but it needs a facelift). I know this is possible because I have this configuration working on a different machine, but I don't believe anything special was performed to make it happen.

I have Ubuntu 14.04 64bit installed on my laptop, and have removed gnome-screensaver using "sudo apt-get remove gnome-screensaver". I've added an entry to the startup applications to run "xscreensaver -no-splash". If I wait 5 minutes, the screensaver starts up as expected, however when I move the mouse I find it returns me to an unlocked session. In case you're wondering, yes I'm waiting until after short timeout where it would otherwise allow me to wake up the session without needing to type your password.

I've tried playing around with various configurations under System Settings / Brightness & Lock. The options I've tried setting are ensuring that "Lock" is enabled, and setting "lock screen after" to 5 minutes. However this seems to have no effect. I was actually wondering if this was due to the removal of gnome-screensaver.

I've tried following the steps under the apps man page, however it requests me to modify /usr/share/applications/gnome-screensaver-preferences.desktop which doesn't exist (I believe because gnome-screensaver-preferences is no longer shipped with gnome-screensaver, and is uninstalled in any case).

I then found a slightly different version of the man page here: http://manpages.ubuntu.com/manpages/lucid/man1/xscreensaver.1.html

Under the GNOME heading it asks you to modify the same file as before, that also doesn't exist.

I'm at a bit of a loss really. I would have thought that if xscreensaver was configured to not lock the screen, but have Ubuntu configured to lock the screen, then the 2 should work together. So I'm wondering if they're conflicting somehow?

Appreciate any and all help.


1 Answer 1


Ok I've resolved this issue now, and am posting the solution for anyone else that wants to do the same as I have.

  1. xscreensaver needs to be launched at startup via "Startup Applications" (hit Super and type "Startup"). Add a new entry to launch the xscreensaver daemon on startup as xscreensaver -no-splash.

  2. You need to bring up the xscreensaver config app. Hit Super and type screensaver. Set the "Blank after x minutes" to your desired amount (e.g. 5 minutes). Remember this value for later. Ensure "Lock screen after" is UNCHECKED.

  3. Finally, go to System Settings / Brightness & Lock. Set "Turn screen off when inactive for x minutes" to the same value as you set xscreensavers "Blank after x minutes" setting (e.g. 5 minutes). Then still under Brightness & Lock, set "Lock screen after:" to "Screen turns off".

And you're done! If your system is idle for the set amount of time, the screensaver will kick in, and in the background your session will also lock. When you wake your system, you will find it locked and asking for your password. No ugly 90's login prompts... awesome. The one caveat is that your screensaver will apparently not kick in if your session is already at a login prompt, the screen will simply turn off.

  • 1
    One last thing -- under Settings -> Keyboard -> Shortcuts you can add a custom shortcut to lock the screen immediately via the keyboard: the command I used was xscreensaver-command -lock
    – Yannick
    Commented Sep 24, 2015 at 20:17
  • While this fixes the issue of being confronted with the xscreensaver prompt, it does not show the gnome lockscreen when one manually locks (but does not switch off the screen), right? Asking in relation to this question
    – Joost
    Commented Dec 15, 2015 at 13:58
  • Has anyone got this working in Ubuntu 18.04?
    – BSUK
    Commented Feb 11, 2019 at 13:44

You must log in to answer this question.

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