(suspend && lock screen) vs (lock screen && suspend)
[Originally posted to comp.unix.shell but no replies there]
$ uname -a
Linux e130 5.16.0-0.bpo.4-amd64 #1 SMP PREEMPT Debian 5.16.12-1~bpo11+1
(2022-03-08) x86_64 GNU/Linux
$ cat /etc/debian_version
11.2
Hi,
Not sure if this just a command invocation problem or there are other
issues at hand (say, power management, etc) but... I have a script that
binds to 'CTRL + SHIFT + S':
$ cat opt/bin/lock-suspend
#!/bin/sh
systemctl suspend && mate-screensaver-command -l
This one seems to work, however I would have thought that the logical
sequence would be:
mate-screensaver-command -l && systemctl suspend
that is, a) lock screen; b) suspend; c) resume with lock screen on.
Instead, if I use the latter syntax, upon resuming, there is a 10 second
delay before locking the screen, which is not ideal for obvious privacy
reasons.
Any input on that?
--
Ottavio Caruso
Reply to: