Record screen to a GIF animation

I had fun recording screen with FFmpeg, then cropping it (entering coordinates manually) and converting it to GIF using ImageMagick's convert.

Here is more convenient option and it's called byzanz-record:

Debian installation:

sudo add-apt-repository ppa:fossfreedom/byzanz
sudo apt-get update && sudo apt-get install byzanz


# Example
byzanz-record --duration=15 --x=200 --y=300 --width=700 --height=400 out.gif

# I prefer using this configuration: top-left corner of the screen
# this way it is more predictable
byzanz-record --duration=2 --x=0 --y=32 --width=300 --height=200 out.gif