Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Like many others, I rely on screen heavily. It's a fantastic way of getting work done when you need to be able to drop and come back later.

It's also an awesome teaching tool by allowing folks to all login to the same account and then screen -x the session so everyone can see how to accomplish a specific task.

Is it possible to prevent the sharing that screen allows with the -x flag? Or to limit it so that in order to reattach or join a session you need to provide a password?

Do I need to be looking at the 'acl' features of screen, and, if so, which ones / how do they work?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

I think you are looking for the lock option so that after a disconnect it pro prompts you for a password. There is a lock session option listed on the man page. C-a C-x (lock screen) lock this terminal.

C-a C-x  (lockscreen) Lock this terminal.

share|improve this answer
    
This just prompts you for your user password, which apparently has been given to all the students. –  Jarvin Sep 30 '10 at 11:46

Screen sessions are inherently private. You can't share screen sessions unless you are all logged into the same user. Since you have had everyone log into the same account they all know your password and your computer has no way of distinguishing you from them. If you want a private session, you'll need to create another user for which only you know the password.

The only other solution I can think of is using some program inside of screen that allows you to lock your terminal with a specified password or do constantly log other people out of your screen session by doing something like this: screen -d -r

share|improve this answer

How about ssh -t me@my.remote.machine '/usr/sbin/screen -R mysession'?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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