Skip to content

Instantly share code, notes, and snippets.

@sinewalker
Last active May 23, 2018 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinewalker/83171cc0d1c5f4d9cc236022f23c2264 to your computer and use it in GitHub Desktop.
Save sinewalker/83171cc0d1c5f4d9cc236022f23c2264 to your computer and use it in GitHub Desktop.
Share a GNU Screen session with a different user

Let's say you want to do some cooperative hacking with another user. Here is how:

  1. Screen needs the setuid flag set:
ls -l $(which screen)
-rwxr-sr-x 1 root screen 383096 May 11  2016 /usr/bin/screen

If yours doesn't have an s in the mode field, set it:

sudo chmod +s $(which screen)
  1. Start a screen session (here the session is called "hacking"):
screen -S hacking
  1. Set multiuser

Ctrl-A :multiuser on

  1. Add the other username to the ACL list of the session (allows them to join, here the other username is "bob"):

Ctrl-A :acladd bob

  1. Now the other user can join your session (here the sharing user is called "alice" and bob is joining the "hacking" session):
screen -x alice/hacking
@sinewalker
Copy link
Author

might be able to start the screen session (step 1) with -xS to turn on multiuser from the command line. But knowing how to turn on multiuser for an already running session is helpful too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment