2

I got XScreenSaver and removed gnome-screensaver by following these instructions: https://askubuntu.com/a/293014/364819

And my settings are as follows:

XScreenSaver Preferences

And it is all working fine and that, but I would much more prefer it to be so that when the screensaver starts, if I then wake it up, for it to go to suspend and lock, and not just to be after a certain time of being in the screensaver.

I tried achieving this by setting the "Lock Screen After" to 0, but this just meant that when the screensaver came on, it would just immediately lock, and then the screen would go black, and so no screensaver.


OS Information:

Description:    Ubuntu 14.10
Release:    14.10

Package Information:

xscreensaver:
  Installed: 5.26-1ubuntu3
  Candidate: 5.26-1ubuntu3
  Version table:
 *** 5.26-1ubuntu3 0
        500 http://gb.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages
        100 /var/lib/dpkg/status

1 Answers1

1

In the past you could enable this behavior under lxde with various combinations of xscreensaver-command -lock and/or xss-lock, but these options apparently no longer work under systemd.

Assuming you are using lightdm (which you should be on Ubuntu), you can use light-locker to re-enable screenlocking on suspend/resume with xscreensaver:

sudo apt-get install light-locker

then reboot.

Automatic locking on resume will be re-enabled, but you will have two different lock screens.

When waking up, the screen will be locked with the lightdm-greeter screen.

When the xscreensaver starts after a period of inactivity, you will still see the normal xscreensaver unlock screen.

chaskes
  • 15,246