fbcat takes a screenshot using the Linux framebuffer device. Two executables are provided:
Low-level
fbcat
that operates on the current virtual terminal and writes the screenshot to stdout in the PPM format:$ fbcat > screenshot.ppm $ file screenshot.ppm screenshot.ppm: Netpbm image data, size = 1280 x 1024, rawbits, pixmap
High-level
fbgrab
that supports the PNG format and virtual terminal switching:$ fbgrab '-?' Usage: fbgrab [option...] <filename.png|-> Options: -c <N> grab from /dev/ttyN -C <N> grab from /dev/ttyN, for slower devices -d <dev> use framebuffer device <dev> -i turn on PNG interlacing -s <N> sleep <N> seconds before making screenshot -? show this help message and exit If the specified destination is "-", the PNG output is piped to stdout.
See the manual pages for details.
The following visuals are supported:
TRUECOLOR
DIRECTCOLOR
PSEUDOCOLOR
STATIC_PSEUDOCOLOR
MONO01
MONO10
The following software is needed to build fbcat
:
- C compiler
- Linux kernel userspace headers
- GNU make
Additionally, the following software is needed to rebuild the manual pages from source:
xsltproc
(part of libxslt)- DocBook XSL stylesheets
fbgrab
requires the following software:
chvt
(part of KBD)pnmtopng
(part of Netpbm) or GraphicsMagick or ImageMagick
To install system-wide:
$ make $ sudo make install
The default installation prefix is /usr/local
.
You can specify different one using the PREFIX
variable, e.g.:
$ make install PREFIX="$HOME/.local"