use ffmpeg, replace with your actual screen size, adjust file name to suit you and q
to quit. Command Line of course, or you could put it in a bash script and run it like that.
ffmpeg -r 30 -s 1600x900 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 screencap001.avi
Records your entire screen. Maybe able to adjust screen size to fit your needs as well to make it smaller.