4

I am trying to lock and suspend from the terminal. I tried:

pmi action suspend | at now + 1 min

And then typed

exit

But both that and vlock kill the running command. Is there a way to lock the terminal and than get the computer to suspend using only Terminal commands?

Eliah Kagan
  • 117,780
JGreen
  • 261

1 Answers1

3

I use sudo -v;gnome-screensaver-command --lock;sleep 10;sudo pm-suspend, with the sleep long enough for me to put the kbd and mouse away. Look at man pm-action for other commands (pm-hibernate,pm-suspend-hybrid), and be aware that hibernate doesn't work with encrypted swap.

waltinator
  • 36,399