Comment 40 for bug 830348

Revision history for this message
gethin (gethinlw) wrote :

This is a really bad issue, and frankly makes Linux security look like a bit of a joke. This is what I did to get around it for the suspend key on my desktop:

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-bettery-action as well if you're using a laptop).

2. Save the following script to a convenient location (also works with gnome-screensaver-command):

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

3. Use the System Settings app to create a custom keybinding for the sleep key that points to my 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.