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
- 2006-06-11: ttyrec 1.0.8 Released
- Introduced a hack to reduce the playback time drift.
Based on Matthias Kilian's patch. Thanks!
- Introduced a hack to reduce the playback time drift.
- 2005-12-17: IPBT is added to Links .
- 2003-05-15: TTYPLAYER is added to Links .
- 2000-12-27: ttyrec 1.0 Released
It's the first version.
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.
- "+" or "f" to speed up the playback twice
- "-" or "s" to speed down the playback twice
- "1" to change the playback to the normal speed
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
- On SVR4 system such as Solaris, try `make CFLAGS=-DSVR4'.
I don't want to employ autoconf because brevity is the beauty of ttyrec. - ttyrec doesn't work on IRIX 6.4.
- ttyrec depends on terminal size.
Links
- IPBT
A ttyrec player that can rewind based on PuTTY's terminal emulator - TTYPLAYER
A Java applet for playing back ttyrec's data on a web browser. - Term::TtyRec (Perl module)
- x11rec: a very ad hoc X11 recorder
- Debian Bug report logs - #68556
A friend of mine told me that Mr. Joey Hess implemented the same thing. If I had only known that earlier, I would have never reinvented the wheel... - Gerd
Gtk+ Event Recorder - chatty: a chatty tty
chatty displays chatty messages in the title bar of your tty according to your input strings.