an example gif made with kgif
An example gif of VLC made with kgif

KGif is a teeny-tiny tool that creates an animated gif from the active window on your Linux desktop.

It’s dead simple to use too, though you will need to make sure you have both of its dependencies — scrot and ImageMagick — installed before you use it.

The app essentially records activity as a series of PNG images and then combines them to create an animated GIF.


This means KGif is only really going to be useful for creating gifs of a certain type of content, like Terminal output.

By default the script is set to take a screenshot of the active window at 0.5s intervals. It then squishes all the .png files it captures together, with each image having a duration of 10ms.

As this is very fast you may prefer to edit the script before use to timings that better suit what you require.

Using KGif

To get started download or save the script from GitHub. Place it in your Home folder (or a scripts folder, and then cd into its location).

To use KGif run it from the Terminal using:


Naturally you might not be ready to start recording. You can use a delay value to specify how long (in seconds) the script should wait before it starts capturing. E.g.:

delay=7 ./

The output is saved in the same folder, where it is named ‘Terminal.gif‘, and all the accrued .png images are deleted automatically.

Give it a whirl!

Apps Gif