How to take a screenshot every n second?
Install scrot
and then run this:
while true; do scrot & sleep 2; done
watch -n2 scrot
or
while true; do scrot -d2; done
while true; do import -window root /path/to/where/you/want/to/save/`date`.png; done