Simple Terminal Broadcasting

Here is a very simple way to live broadcast a terminal session without needing a shared machine (as you would for screen):

Open two terminals (or screen windows).  In the first run:

tcpserver -v 8888 tail -f /tmp/script

That will start a server on all local IP addresses listening on port 8888.  The -v means verbose so you can see when people connect.  You could remove it and then background this process and only use one terminal.

In the second terminal, run:

script -f /tmp/script

And then whatever you do in that terminal will be broadcast to anyone that connects to your server.

Anyone that wants to view your session can simply run:

telnet $HOSTNAME 8888

When you are finished, hit ctrl-d to stop recording and then ctrl-c in the tcpserver terminal. You will be left with a transcript of your session in /tmp/script. Note that script has a '"-t" option to record a timing file. With those two files, you may be able to create a playable recording of your session, possibly with the help of TermRecord.

The OpenStack Infrastructure team plans on using this method along with an Asterisk audio conferencing server for simple and fully free-software screen broadcasting events.


James E. Blair

I love hacking Free Software and have been fortunate to do so professionally with some wonderful people and organizations throughout my career. This is my blog.