Broadcasting your shell output

Author: Mario Antonioletti
Posted: 18 Oct 2018 | 12:47

During a Software Carpentry course you, as an instructor, stand in front of a class typing your lesson content, eg bash or git, and the students type what you type into their own shell.

Depending on the layout of the room, you need to make the font on your terminal large enough for all students to see it, which can be somewhat disorientating as an instructor. Moreover if the layout of the room is not ideal, eg some students are facing away from the screen, they will have to constantly turn to see the screen, which can be a pain for them. But I recently found a Python app that changes all that.

Shellshare is a python app that allows you to stream your shell output through the web. All you have to do is download a Python script:

curl -sLo shellshare https://get.shellshare.net

then start the application on your shell:

python shellshare --room MyShellSession

where MyShellSession is a unique name you give to the session. Students then go to the URL:

https://shellshare.net/r/MyShellSession

and all the output from your terminal is broadcast through that session. Students can copy-paste from the browser on to their own shell to get output as below.

You do not have to make your font bigger and if the desk placement is suboptimal they can still follow what you are doing without having to constantly turn around. Everyone wins! When you are done you just type exit on your shell session and the broadcasting stops.

We tried this out with 19 students at a Carpentry shell session recently and found it worked very well. The sessions were remarkably stable – requiring a restart now and again but it worked very well. If you are going to do this kind of teaching relying on a bash session I would recomend using the utility. For broadcasting you ideally need a Mac or linux machine though it may also work from Windows with a bash shell installed, but I have been made aware that it works on Windows with an install of Cygwin (see this thread). To receive you just need a good browser, regardless of the underlying operating system. This would also work well if you are doing remote collaborative work where you are showing someone how to do something.

Author

Mario Antonioletti, EPCC