mariusv.com

Watch as I awkwardly stumble through life

Using multiuser sessions in GNU Screen

Posted by Marius Voila on October 16, 2010 in London, U.K . — 0 comments This post contains 372 words

GNU Screen is a fantastic utility; however, if you want to use multiuser sessions – that is to share your screen session with another user – you’ll have to set it up.

First, you have to make sure that multiuser capabilities are in the screen binary. We’ll assume for purposes of this article that screen has already been compiled with multiuser capabilities – it appears that most prepackaged versions of GNU screen should have these capabilities already built in.

Make sure that the screen binary is properly configured to use the multiuser capabilities with these steps:

Now that screen is set up, run the initial screen session and prep it for multiuser access:

Finally, the user who wants to access your screen session needs to run screen on the same system thusly:

screen -x shareduser/

This assumes that you ran the initial screen session as shareduser – and don’t leave off the final slash as that is necessary to make this work.

If you want to give this session a name (to separate it from your normal screen session perhaps), then use this command to start the session:

screen -S shared

Then let the other user use this command to connect:

screen -x shareduser/shared

That is, the user running the screen session is shareduser and the session name is shared.

There are more screen commands that are useful in multiuser mode; they are described the manual in section 8.4. There is also another web page that provides some tips on using screen, mostly focusing on multiuser mode – including how to create read-only users.