Skip to content

Instantly share code, notes, and snippets.

@bcooksey

bcooksey/instructions.md

Last active Apr 4, 2018
Embed
What would you like to do?
GNU Screen Pairing

This doc outlines how to setup a remote pairing session using SSH and GNU Screen. These instructions were adapted from https://www.agileventures.org/remote-pair-programming/gnu-screen-pairing-notes

Prerequisit: The person on the guest machine needs a user account created on the host that they can connect to via SSH.

On the Host Machine

  1. Install Screen
    • Mac: Should already be installed, but you can also find it on homebrew
    • Ubuntu: sudo apt-get install screen
  2. (Platform dependent) Add the set-uid bit to screen chmod 4755 /usr/bin/screen
  3. Create a terminal window. Adjust the window to a reasonable size, as this will be the layout that all the guests will see.
  4. Start or resume a screen session (the -L logs the session) screen -R -D -L
  5. Set up multiuser and add permission for the guest user with the next two key sequences. Don't forget the colon after control-A.
    • <ctrl-a>:multiuser on<return>
    • <ctrl-a>:acladd <guest_username><return>

On the Guest Machine

  1. SSH into the guest account on the host machine.
    • If you want to be able to hit a webserver running on the host, include -L 8001:localhost:8000. This allows port 8001 locally to hit port 8000 on the host machine.
    • You may also want -X for X11 forwarding
  2. Join the host's screen session by including the host's username in the following command. The slash at the end is important: screen -x <host_username>/
  3. With a bit of luck, you should be sharing control of a terminal from which you can run console programs and full screen editors like nano, vim, and emacs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment