Which software provides /usr/bin/lock or /local/bin/lck ?

The manual says that GNU Screen will call a screenlock program. But I don't have them in my system. Also my $LOCKPRG is empty. So is there any standard Linux software which I can install that provides lock facility for GNU Screen ?

  • It's a fair Question, but I would be asking why you need this functionality. ISTM it would make more sense to be locking your client (ie your PC or Workstation) than individual screen sessions. Long gone are the days of green-screen terminals – roaima Mar 20 '15 at 7:33
  • @roaima Imagine I'm in a server room with GNU Screen running on it. C-a x sound is nice then! – Sibi Mar 20 '15 at 13:33

My edition of screen on Debian (package version 4.1.0~20120320) has lock functionality built-in; hitting C-a x locks the entire environment (so that not even detach with C-a d is permitted). The Debian version of the man page for screen writes, "Call a screenlock program (/local/bin/lck or /usr/bin/lock or a builtin if no other is available)."

If you want to lock a terminal session you can use vlock. From the man page, "vlock is a program to lock one or more sessions on the Linux console."

I also tried installing vlock and running LOCKPRG=$(type -p vlock) screen. After hitting C-a x to lock the screen I saw that screen was correctly calling vlock to lock the screen. Again, the entire environment was locked so I couldn't suspend screen with C-a d.

| improve this answer | |
  • Sorry for a late reply. But neither my user password nor root password is working for unlocking the screen locked by vlock. – Sibi May 14 '15 at 8:04
  • @Sibi, vlock works for me. Next time you could try with the built-in lock functionality. Or test vlock directly rather than inside screen. – roaima May 14 '15 at 9:04
  • Yes, vlock doesn't work for me inside screen. But it works in a plain shell. I'm looking for something which works inside screen. The built-in lock facility of screen (invoked through C-a x) doesn't accept either of my or root's password for unlocking. – Sibi May 14 '15 at 9:19
  • @Sibi you are using the account password for the system that started screen...? – roaima May 15 '15 at 17:11
  • Yes, I did try that initially. But that doesn't work. Does that work for you under screen ? Also root's password also doesn't work. – Sibi May 15 '15 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.