With tmux you can easily share a session between mutliple users. This is very handy when debugging a problem for example or 'working with 4 eyes' on something.
In order to do that, first launch tmux with specifying a socket (-S) and give the session a name:
[root@server ~]# tmux -S /tmp/shared new -s shared_session
In order to make it so that anyone else can connect, make sure the permissions are rw for both members:
[root@server ~]# chmod 666 /tmp/shared
As the second user, attach to tmux specifying the socket and the session name:
[archy@server ~]$ tmux -S /tmp/shared attach -t shared_session
The output and input are now shared between both users.
Feel free to comment and / or suggest a topic.
there is some typo that you have to change the permission to this "chmod 666 /tmp/shared" not to "chmod 666 /tmp/archy"
ReplyDeleteFixed, thanks for pointing it out.
Delete