Another workaround that I used for Cinnamon. I can't imagine it would be
too much trouble to adapt it to other window managers:

1. Use dconf-editor to change the button-suspend action at org>cinnamon
>settings-daemon>plugins>power to 'nothing' (you could also amend lid-
close-ac-action and lid-close-battery-action as well if you're using a
laptop).

2. Save the following script to a convenient location (it locks the
screen, then suspends):

#!/bin/bash
cinnamon-screensaver-command -l
systemctl suspend

3. Use the System Settings app (cinnamon-settings) to create a custom
keybinding for the sleep key that points to the script.

After this it behaves as it should. You can see the lock screen pop up
briefly before it goes to sleep, which is reassuring.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-screensaver in Ubuntu.
https://bugs.launchpad.net/bugs/1280300

Title:
  Desktop contents displayed on resume, before lock screen is shown

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/1280300/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to