I found out how to suspend via command line, namely by sudo pm-suspend
. What I miss there is that when the machine wakes back up, the sessions (all of them running in different tty's) are not protected by password. I checked the man page for pm
and this aspect is nowehere to be found there. Thus two questions:
1) How to make it work simply?
2) I could make an alias for pm-suspend, but then, what should I put there as instructions? Is there any way to log out of a shell session without killing it? Which is an interesting question on its own.
EDIT:
The question is about how to lock a shell session running outside any X environment (Gnome, etc).
EDIT:
To find out what I mean press Ctrl
+Alt
+F1
and follow from there. But make sure you know how to go back before you jump there :-)
vlock
) – guntbert Apr 06 '16 at 18:47sudo pm-suspend && exit
? – kos Apr 06 '16 at 18:54vlock
answer is relevant though. But only partially. And now I need to find out how to vlock all tty's running a session. – Apr 06 '16 at 18:59vlock
would work well for that. – kos Apr 06 '16 at 19:08vlock -a && pm-suspend
doesn't work. And it blocks in a way it asks for root's password and doesn't accept mine. – Apr 06 '16 at 19:10