Tools used
- xdotool
- byzanz-record
Environments tested
- Ubuntu 14.04/Linux Mint Rosa 17.3
Installation
$ sudo apt-get install byzanz xdotool
Usage
1. Get the position and size of the window you want to capture
$ sleep 3s && xdotool getwindowgeometry $(xdotool getactivewindow) Window 56627781 Position: 470,79 (screen: 0) Geometry: 439x673
In this example you have 3 seconds to open or focus window you want to capture.
2. Set options like Position(X,Y), Windows size (W,H), Delay and where to save the animated GIF
$ byzanz-record --delay=3 -x 470 -y 79 -w 439 -h 673 ~/Pictures/sample.gif
You may need to ajust -w -h options a little