Skip to content
Soren L. Hansen edited this page Apr 27, 2021 · 1 revision

Sharing a terminal session using GNU screen

Start a new screen session named gotty with screen -S gotty and launch GoTTY with gotty screen -x gotty.

Anyone connecting to GoTTY will now see your screen. Add -w to let them participate: gotty -w screen -x gotty.

Sharing top using tmux

Launch GoTTY with gotty tmux new -A -s gotty top.

This command doesn't allow clients to send keystrokes, however, you can attach the session from your local terminal and run operations like switching the mode of the top command. To connect to the tmux session from your terminal, you can use following command.

tmux new -A -s gotty

By using terminal multiplexers, you can have the control of your terminal and allow clients to just see your screen.

Quick Sharing on tmux

To share your current session with others by a shortcut key, you can add a line like below to your .tmux.conf.

# Start GoTTY in a new window with C-t
bind-key C-t new-window "gotty tmux attach -t `tmux display -p '#S'`"

Give users a shell in a Docker container

When you want to create a jailed environment for each client, you can use Docker containers like following:

gotty -w docker run -it --rm busybox