Search code examples
sshncursesgnu-screenttyscreensharing

Can you use screen(1) with multiple TTYs to do low bandwidth console sharing?


Working in low bandwidth environments sometimes I need to share a text console (TTY) screen with a co-worker. I often use the screen(1) tool to keep multiple windows open in the same SSH connection and be able to reconnect and continue where I left off, when my connections drop due to bad internet. I wonder if we could not attach multiple SSH sessions / TTYs to the same screen(1) session so that my co-worker(s) and I can both use the same console? It should be possible, but is it?


Solution

  • The answer is as follows:

    1. first screen session is started with

      screen ...

    2. then from another console as the same user someone else can attach to the same screen session with

      screen -x

    And then they can both work, one thing typed by one will be visible by both, etc.

    Note: if the screen session has multiple windows, then each attached terminal can switch to a different window independently.