How to record/playback terminal in Linux (using scriptreplay, ttyrec, TermRecord, asciinema, showterm)

It is useful to be able to rapidly share computer activity with a screencast, by recording and playback TTY output of a text-mode program.

$ script -t 2> timingfile
# script started, file is typescript
$ ls
<etc, etc>
$ exit
# script done, file is typescript
$ scriptreplay timingfile
  • ttyrec/ttyplay is a program and/or its file format capable of recording the TTY output of a text-mode program together with timestamps and then replaying it. similar to the script command, but also allows for pausing, slowing down or speeding up playback. ttycast broadcast your ttyrec in real time.
$ ttyrec
# in the executed shell, do whatever you want and exit
$ ttyplay ttyrecord

$ npm install -g ttycast
$ ttyreccast outfile.tty
# open browser to 'http://localhost:13377/'
$ reset && ttyrec /tmp/ttycast
  • TermRecord@github saves your recording locally as a sel-contained html file and you can replay it in your browser.
$ pip install TermRecord
$ TermRecord -o /path/to/output_html
  • asciinema.org is a free and open source solution for recording the terminal sessions and sharing them on the web.
$ curl -sL https://asciinema.org/install | sh
$ asciinema rec
  • showterm.io variation of asciinema for replaying terminal sessions but this one is in pure text. It is both lightweight and the result is copy and pasteable.
$ gem install showterm
$ showterm 
# or if you have not installed showterm, you can run the standalone
$ bash <(curl record.showterm.io)
  • monitor recordings are uploaded to commands.com. You can also download the scripts (check the installation step).
$ curl commands.io/install-monitor-ubuntu
$ monitor -u myusername
Advertisements

One comment

  1. Can anyone with experience in these tools post how to avoid the automatic upload in each? (such as showterm) Use case: I wish to create a hand editable file (IOW, not a binary format and elegant text format) but I have no wish to upload some of these.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s