0

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 :-)

1 Answers1

0

It seems like I can answer my question myself. Still, give more answers if you have them.

sudo pm-suspend && vlock -a does the trick. But it requires the vlock being installed. And don't make it the other way round, ie. sudo vlock -a && pm-suspend, as it will ask for root's password on wake up, and there is no such thing in Ubuntu, as far as I know.