Tmux – Ways to Share a Session Between Two Users

tmuxusers

I'm looking for a clean and easy way to share a tmux session with another user on the same machine. I've tried the -S socket-path option, but it requires opening up all permissions of the socket-path before someone else can connect to the session. It works, but it's a little cumbersome. For example:

# Me
$ tmux -S /tmp/pair
$ chmod 777 /tmp/pair

# Another user
$ tmux -S /tmp/pair attach

This works, but both users now share the same tmux configuration (the configuration of the user who initiated the session). Is there a way to allow the two users to use their own tmux config and their own individual tmux key bindings?

For bonus points, ideally, it would also be nice to give read-only access of the tmux session to other users.

Best Answer

From https://github.com/zolrath/wemux:

wemux enhances tmux to make multi-user terminal multiplexing both easier and more powerful. It allows users to host a wemux server and have clients join in either:

Mirror Mode gives clients (another SSH user on your machine) read-only access to the session, allowing them to see you work, or

Pair Mode allows the client and yourself to work in the same terminal (shared cursor)

Rogue Mode allows the client to pair or work independently in another window (separate cursors) in the same tmux session.

It features multi-server support as well as user listing and notifications when users attach/detach.

It is a shellscript wrapper over tmux - no compiling necessary.

Related Question