[systemd-devel] lock virtual consoles on suspend/hibernate

Lennart Poettering lennart at poettering.net
Tue Nov 20 17:21:31 UTC 2018


On Sa, 17.11.18 15:59, thomas at m3y3r.de (thomas at m3y3r.de) wrote:

> Hi,
> 
> what would be the best way to solve this problem? I want that all my
> virtual consoles are "locked" before suspend/hibernate. I tried to put
> in an little script in /usr/lib/systemd/system-sleep/ that calls vlock
> tool from kbd package but that doesn't seem to work.
> 
> any ideas, suggestions?

Well, there's no ready made tool for this afaik. That said, the APIs
the graphical UIs use to implement this are no different when used
from the console (take an inhibitor lock that gives you time to lock
the screen before suspend proceeds). So you could write a tool you'd
have to start when you log in that does what vlock does internally
whenever the inhibit lock is triggered.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list