-   Linux - Newbie (
-   -   Lock the current terminal session? (

kipbenson4 08-12-2003 07:05 PM

Lock the current terminal session?
There might be an obvious answer to this, but it's not coming to me.

Is there any way to lock the terminal session so no commands can be entered at the prompt without a password verification?

For example, I'm have to leave my machine for a few minutes, but I don't want to completely close my SSH session. But I also don't want prying fingers rumaging through /bin while I'm gone.

Is there anythign built in to bash? Can I download something?


arobic 08-14-2003 09:04 AM

You can do a xlock command which will lock your screen too and will ask you for a password to access your screen unchanged. This would a solution.

For bash, I think it would be hard to make it efficient on all open terminals and I don't if there is a built in.

Here is the command. You can also make it pretty by changing the mode (screen saver) or the defaults in the password window (see man xlock for details). Enjoy!

xlock -mode blank -nice 19
Of course, this is only valid if you are using X.

Hope this helps!

All times are GMT -5. The time now is 02:05 PM.