ttyrec: a tty recorder

Last Modified: 2006-06-11 (Since: 2000-12-27)


What's ttyrec?

ttyrec is a tty recorder. Recorded data can be played back with the included ttyplay command. ttyrec is just a derivative of script command for recording timing information with microsecond accuracy as well. It can record emacs -nw, vi, lynx, or any programs running on tty.

What's New

Usage

Recording

  % ttyrec
  (In the executed shell, do whatever you want and exit)

  % ttyrec -e command
  (command specified by -e option will be executed)

Playback

  % ttyplay ttyrecord  

-s2 option makes the playback speed doubled. With -p option, you can peek another person's ttyrecord in real time. Have fun!

You can change the speed while playback by the following key strokes.

File Transfer

ttyrec -u option allows you to transfer a file using uuencode command. you can transfer foo.zip file in a remotehost to a localhost as the following.

  % ttyrec -u                 # Invoke ttyrec command with -u option.
  % ssh remotehost            # Log in to remotehost.
  % uuencode foo.zip foo.zip  # Transfer foo.zip with uuencode.
  % exit                      # Log out from remotehost.
  % ls foo.zip                # foo.zip is transfered!
  foo.zip   

You need uuencode command in the remotehost and uudecode command in the localhost. ttyrec -u automatically invokes uudecode command in the localhost when the uuencoded data is tranfered.

Measuring the time of recorded data

ttytime tells you the time of recorded data in seconds.

  % ttytime *.tty
      173 foo.tty
     1832 bar.tty

Let's play with ttyplay server!

You can run "ttyplay server" by simply using inetd. Just add a line like the following to /etc/inetd.conf.

12345 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/ttyplay /var/tmp/foo.tty 2>/dev/null

And type the following command in the shell.

% telnet localhost 12345

With -p option, live streaming can be performed.

12345 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/ttyplay -p /var/tmp/foo.tty 2>/dev/null

Please visit tty mania for sample videos.

Suggested by Takuo Kitame

Tips

Recording all-the-day works results a large data file. You can gzip it for saving space and gunzip it for playback.
Suggested by : Takatsugu Nokubi

  % gzip ttyrecod
  % gunzip < ttyrecord.gz | ttyplay

Download

ttyrec is a free software under the terms of the BSD Licence.

Known Problems

Links

ttyrec terminal

I want the ttyrec-built-in terminal...


Satoru Takabayashi