* Front Page * Table of Contents * Return to Town

Collaborate with Tmux

Tmux allows multiple clients which is perfect for sharing a terminal session. This guide shows two ways to set up a Tmux socket to allow connection from a different user.

Warning

Be aware that by doing this, you are allowing another user of tilde.town to have full control over your tmux session - that means, they could possibly launch any command as you.

Manual

Start a tmux session with a custom socket path: tmux -S /tmp/someTmux (replace this with something else)

In the tmux session, run the following to set Access Control Lists to allow a user to connect to tmux: setfacl -m u:USERNAME:rw /tmp/someTmux

Do not use chmod 777 here as that would allow anyone on tilde.town to open your session.

After setting the Access Control List, the other user has to connect using: tmux -S /tmp/someTmux attach

Automated

A script that automatically does the setup is available in ~mattx/pairing.sh. It accepts two arguments, the first being the user that you want to connect, and a second, optional one that specifies the socket name to use - if it isn't present, a random socket name will be generated. Example: ~mattx/pairing.sh mattx myTmuxSocket


last compiled: 2022-08-07 08:56:07.545629