Screenshots from the command line (FreeBSD)
vidcontrol is a nice utility that among other things allows one to capture the state of a video buffer and dump it to a file. The format of this file is specified in the man page as it is not a regular image file. For this reason one needs a specific tool to convert it to something one can play with. These commands are scr2txt (/usr/ports/textproc/scr2txt) and scr2png (/usr/ports/graphics/scr2png).
They can then be combined using one single line:
$ vidcontrol -p < /dev/ttyv0 | scr2txt > /tmp/screenshot.txt
The -p flag instructs vidcontrol to get the current content of the corresponding video buffer. ...