Your Linux Data Center Experts

Often when using screen I'll run across the need to share a session with a co-worker or client. If we're both logged in as the same user a simple “screen -x” usually does the trick. This doesn't work as cleanly when the person trying to join is logged in on a different account. Fear not, this is actually fairly simple to accomplish!

Luckily, screen can handle this. It requires using the multiuser option and does require that the package is compiled with multi-user support enabled. I've found that this is the case for the version of screen found in the current releases of both CentOS and Ubuntu.

Let's say that I'm logged into a system as the user mike and the person I need to share a screen with is logged in as bob. If I'm already running a screen, I'll need to set two options from the “C-a :” command line: “multiuser on” and “addacl bob”. bob can now connect to my running screen using “screen -x mike/”.

If it's easier, you can set this up before-hand in your ~/.screenrc so that you don't have to enter the options as above:

multiuser on

acladd bob

You can also give that user a password using “acladd bob password” if you need to. The man page for screen(1) has many options, one of which is the ability to allow another user to connect as a read-only session using “chacl username -w "#"” but I didn't need this and wasn't able to get a short test to work. Perhaps I missed something simple..

comments powered by Disqus

Join our other satisfied clients. Contact us today.