Den 2022-05-11 skrev Ottavio Caruso <
[email protected]>:
Hi,
Hello,
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:
I have to agree with you that the sequence of first locking and then
suspending seems the reasonable one so you have me intrigued.
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?
A quick glance at the source code shows that mate-screensaver can be
built with systemd support. It then listens for the PrepareForSleep
signal sent by systemd and does a few things. It appears that it could
be configured to lock the screen automatically on suspend. If I were
to guess, the signal sent by systemctl suspend conflicts with your mate-screensave-command -l call in some way.
To figure out what's going on, I would suggest enabling debug logging
for mate-screensaver and/or using dbus-monitor to see what messages it
sends and receives.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)