fbdump (captures the visible portion of framebuffer to stdout)
fbdump is a simple tool that captures the contents of the visible
portion of the Linux framebuffer device and writes it to the standard
output as a PPM file. In other words, it takes a screenshot of
anything running on the framebuffer. It currently has fairly complete
support for packed-pixel framebuffer types and also works with the
VGA16 framebuffer driver.
To get a popular image format, issue a command like:
fbdump | pnmtopng > shot.png
Note: fbdump is rather slow on modern systems with high-resolution
framebuffers at 32-bit color depth. On some systems, it takes several
seconds to dump a 1920x1080x32 framebuffer. Be patient. Or use fbcat
instead.