yellow/RemoteTerminalBroadcasting

Not logged in - Log In / Register

Warning

This page has been superseeded by our work on Termbeamer.

Terminal Sharing

It is possible using common Unix tools to broadcast a terminal session on your development machine to another person. This facility can be very helpful in remote pairing. This is still a work-in-progress, but it has worked well for the few of us that have used it.

The viewer will have no control over the session, this is one-way only.

There are two variations outlined below, the first is the most secure and the most likely to be useful for two Canonical employees to collaborate.

Both variations require that the sending and receiving terminals use the same character encoding (e.g., UTF-8) and terminal size. Encoding and terminal size can be set under Gnome Terminal's "Terminal" menu.

If at any point the receiving terminal display is corrupted, clearing or otherwise refreshing the screen (for example, scrolling a page up and then back down) should set things right.

Sharing over SSH

This approach requires that both users have an ssh-accessible account on the same machine.

This (long) command line creates a temporary file named /tmp/$USER-term on the remote machine (we're using chinstrap.canonical.com here):

Now start a shell session that will be broadcast:

Optional but recommended: start screen or tmux so you can have multiple terminals at the ready (e.g., one for a shell and one for an editor).

The receiving user would enter this command. Note that the value for OTHER is the sending user's name on the sending machine, not on the REMOTE machine.

The connections to the REMOTE machine are encrypted, so network snooping isn't a concern, but the fifo on the REMOTE machine is world-readable, so you should assume that anyone with access to REMOTE could be eavesdropping.

Sharing over TCP

You will need a publicly accessible IP address, either locally or somewhere on the Internet for the viewing party to connect to. In this instance I'll be using the host benjiyork.com. If there is a firewall or similar (e.g., wireless router) that mediates access to the host, you may need to open the port used (2020 in this example).

The connection between the host and the viewer is unencrypted, so assume that anything the viewer can see can also be seen by anyone else in the world. In practice, once a connection is made only someone capable of intercepting the packets en route would be able to view the session.

Set up the sending terminal

Make a fifo:

Start "script" against that fifo:

Optional but recommended: start screen or tmux so you can have multiple terminals at the ready (e.g., one for a shell and one for an editor).

Expose that fifo via tcp using netcat:

Tunnel that tcp connection to a remote host:

Connect the viewer

The remote user then connects:

yellow/RemoteTerminalBroadcasting (last edited 2012-05-17 12:45:45 by benji)