4 eyes principle using tmux/screen. Share your xterm with somebody else. Collaborative Coding.


FBnil

They'll own everything and be miserable.
Joined
Dec 14, 2012
Messages
5,114
Location
Yurp
If you work in IT and need to share your screen with a colleague, there are some options in most communication programs to share your screen. But the screen is compressed, and typing on an xterm really unreadable.

Now to share your session, as seen in the link below, you not only can chgrp, but also setfacl a socket file to give another userid access. This way you can add a bunch of people.


Good points:
  • At any point in time, somebody else can select and copy the text to the clipboard.
  • You can kick selected people out
  • Collaborative! No need to grab the keyboard and type as with side-by-side code review.
  • One cursor
  • High-res! You font and colors because you do not send images, you send real characters, which get rendered on each screen as configured.
  • tmux is a standalone binary
  • screen is installed on the Pandora

Bad points:
  • Others can type in too. Even in between... and read-only is on voluntary basis in screen, and totally rw in tmux
  • You must have your screen about the same size, or the screen is truncated (edit: as @PowerGod pointed out: It's resized to the smallest common screensize).
  • screen needs suid bit
  • tmux is not on the Pandora (but might be compiled to have it)
 
Last edited:
Saying that the "screen is truncated" could make people think that it will lose some content, while Tmux just limits the characters per line of the terminal considering the smallest screen actually connected to the session, just like when reducing manually a terminal window.
 
Yes, tmux truncates the top and bottom lines unless you know about its history feature, but in terms of the line length it wraps at the smallest screen.

I've not checked the link yet, but I'll just note that this isn't a solution for remote terminal videoconferencing, since both software need to be started from a connected terminal user (and I think it must be the same user, although only the local user needs the account password). You'll need to make your server essentially discoverable on t'internet if your users aren't on the same local network. There are ways to limit your exposure when doing that, and I don't know what's in the link.

Edit: I've checked the link, and it has taught me that it's possible to create a tmux session that isn't limited to one linux user. That's worth knowing about.
 
Back
Top