Both Lock and Suspend on Laptop Lid Close - Looking for command line option
Hi there,
I've been looking all over for a way to get my laptop running Bodhi to either:
both lock the screen and suspend when closing the laptop lid,
OR
set this to option to a key-binding WITHOUT getting a prompt appear to confirm whether I'm "sure [I] want to suspend [the] computer?".
I've set the lock settings to lock when suspending and when I suspend either from system menu, or from a keyboard shortcut, this works (though with keyboard shortcuts it has the above mentioned issue of a dialogue box that appears first for confirmation, which I then need to use the touchpad to confirm.)
However, when I suspend the laptop, or call:
suspend
from the command line, the lock does not properly activate.
The laptop just suspends and when waking from sleep does not prompt for a password before returning me to my session.
I've also tried:
systemctl suspend
from the command line, but this also does not lock before suspending.
I'm currently thinking to figure out how the screen lock functions on bodhi so that I can write a shell script which activates the lock and then suspends the computer. I would then append this the ACPI binding for lid close, which will launch a command to run the shell script.
However, I can't seem to find any information anywhere on how the lock settings on bodhi work under the hood, in which files the settings exist, or how to activate them via command line.
Any help or insights regarding any of the above would be greatly appreciated.
Even somebody just pointing me to some docs where I can find the command-line commands needed to work with the enlightenment/moksha environment from a terminal, specifically the lock settings,
or,
some docs that explain which program is being used for locking the screen on bodhi under the hood, so that I can look up docs for this on my own,
would be excellent.
Thanks in advance for any help,
Jo
|