ttystudio – Record the Terminal session in GIF

A while ago, we have written about ‘script’ command which can be used to record the Terminal activities in Linux. For more details about ‘script’ command, check the following guide.

In the same series, we will today see how to record our Terminal activity using ttystudio tool.

Unlike ‘Script’ command, Ttystudio will record your Terminal activity and save the output in GIF or PNG format without any external dependencies, bash scripts, gif concatenation, etc. The Script command displays the output in plain text format.

Compared to other Terminal recorders, ttystudio is quite different.

  • No GUI is required at all – you can record on a remote machine via ssh.
  • It has its own built-in gif and apng writer, no imagemagick required.
  • It has a font parser to render the font during image writing so no terminal playback is required when writing the image
  • No concatenation of hundreds of gif files required. ttystudio automatically writes out to one gif or apng.
  • No glitchy frames due to imperfect GUI recording of the playback or gif concatenation.
  • ttystudio will record frames even if nothing is being updated on the screen.

Install ttystudio in Linux

We can install ttystudio using npm pakcage manager. In order to use npm, we must install NodeJS.

To install NodeJS in DEB based systems, run:

sudo apt-get install nodejs npm

In RPM based systems:

sudo yum install epel-release
sudo yum install nodejs npm

Then, install ttystudio using command:

sudo npm -g install ttystudio

Usage

Ttystudio is very simple to use.

A typical ttystudio command usage is given below.

ttystudio unixmen.gif

Now, start to do some couple of activities in Terminal.

Let us enter few commands.

ping unixmen.com -c 3
uname -mrs
mkdir /unixmen
rmdir /unixmen
cat /etc/*-release
whoami
who
last root

Just enter as many commands as you want. After entering all commands, stop the recording by pressing CTRL+Q.

Now, ttystudio will start to compile the Terminal activity in GIF format, and save it the current directory.

Here is my sample terminal activity in GIF format 😎 .

unixmen

Also, open the GIF file in any browser or image viewer to verify it.

unixmen.gif (640×336) - Google Chrome_008

unixmen.gif (640x336) 100-_009

For more usage details, refer the help section by using the following command.

ttystudio -h

Conclusion

Personally, I like this command very much. It’s quite useful to document our Terminal activities in GIF format or in PNG format. Rather than recording and saving Terminal activities in text format, ttystudio allows you to record and play them in GIF format which I personally like very much. This command will be quite useful for Linux trainers, system administrators, technical writers whose wants to display the terminal activities in a nice gif format. The only downside I noticed while testing this command is it will take much time to record and compile the output in GIF format, rather than in PNG format. Apart from minor issue, ttystudio does its job perfectly.

That’s all for now. Hope this helps. I will be here soon with another interesting article. Until then, stay tuned with Unixmen, and share this article to your social networks.

Cheers!

Reference links: