Klaus Zimmermann's Corner

Status on 2021/03/18, 12:51

And the saga continues - learning FreeBSD one command at a time.

Turns out that suspending the system is not that bad, in fact you can do it via command-line even on the console, like this:

acpiconf -s 3 # must be root 

My guess is that you can probably edit your /etc/sudoers file to include yourself and that command specifically as a NOPASSWD entry, and then be able to issue that command without hassle (a-la Linux's loginctl), which then would allow you to run the following to "lock" the screen upon suspending:

acpiconf -s 3; logout 

Next step is to bind this to some action and run this graphically. Or use it with a power manager, that's probably better.