The animated gif trick is getting a little more attention than I thought it would. I would never want to be thought a holdout, but the original explanation was buried in some comments.
So here’s a quick script that I use, plus the one-liner that actually makes the gif.
For this you’ll need only fbgrab and imagemagick, although I guess those could be replaced by alternative programs. To the best of my knowledge, neither of those requires anything from Xorg, but that might depend on your distro.
First, something I call “gifgrab,” which starts from another virtual terminal:
#!/bin/bash mkdir ~/gifgrab cd ~/gifgrab sleep 3; for i in {100..999} ; do fbgrab `date +%Y-%m-%d`-${HOSTNAME}-${1}-${i}.png ; done
You can go ahead and laugh at my programming ability now. ๐ณ
The sleep command gives me time to switch to the “desktop” from the alternative tty. I loop from 100 to 999 only because I like the digits to line up pretty in the folder :roll:, and those numbers will be ignored anyway, once the pngs become a gif.
I should mention that I usually CTRL+C out of the script, which means the last png in the folder may be an incomplete image. Just for safety I delete that last one.
I like to keep the png files together in a folder in a predictable space, mostly because the next command is rather laborious, and so I’ll rsync that folder to a faster machine, and actually convert it later.
And here’s the conversion command, from inside the folder with the pngs.
convert -delay 75 -loop 0 2013* 2013-05-15-solo-2150-title.gif
You should change the filenames to whatever. I use a delay of 75, only because the “framerate” tends to me more than a second, and otherwise the gif gets long and boring. The loop flag tells imagemagick to let it repeat indefinitely.
I think that’s all. If you find a way to streamline this, I am always interested. Cheers. ๐
Edit, 2013-05-16: I should note that this “technique” will work on a standard Xorg desktop too, if you use the proper screenshot tool. For example, if you substitute scrot for fbgrab in the gifgrab script, you get an identical effect, for X.