When using the virtual terminals on TTY 1-6 [*], it's sometimes easy to forget to log out: The screen goes blank after a while, but I'm still logged in - no password required, anyone can use my account. (Or I switch to another TTY, and forget the other one...)
I'd like to have screensaver-like functionality that locks the terminal after 3 minutes, and then requires a password. How do I set this up?
[*] With TTY 1-6, I mean CTRLALTF1 - CTRLALTF6 (no X Server)
vlock
andexec ssh localhost
are great ideas (I will definitely use them)! You're right, it's probably hard to query the idle time without an X server. However, I wonder why the screen does go blank after some time (and wakes up on keypress)? So maybe the same "trigger" could be used to lock the screen automatically somehow? – Chris Lercher Jun 27 '11 at 14:22setterm -blank [0-60]
, see man page. – Chris Lercher Jun 27 '11 at 15:26exec ssh localhost
does not logout automaticall afterLoginGraceTime
for me. I waited for about 8 minutes but nothing occured! – PHP Learner Jul 30 '15 at 06:55