Skip to content
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time


FBGrab is a framebuffer screenshot program, capturing the linux frambuffer and converting it to a png-picture. FBGrab is delivered as is without any warranty and license is GPL version 2, see tar-ball for details.


   fbgrab - takes screenshots using the framebuffer device


   fbgrab [options] filename


   fbgrab  reads  the  framebuffer device (/dev/fb*) or a dump thereof and
   saves a PNG image file. You can use it for  making  screenshots  of  of
   virtually  any  application, from traditional test applications to your
   X-windows desktop, as well as framebuffer applications.


   -?     print usage information.

   -b bitdepth
          the number of bits per pixel used, optional  when  reading  from

   -c console
          specifies which console (or virtual terminal - like other people
          call this feature) to grab. Sometimes this  changing  is  faster
          then  the  framebuffer  is  refreshed  (especially when grabbing
          framebuffer apps). If so, you should use  -C  console  ...  This
          waits some time before grabbing. You can't use -s in this case.

   -d device
          specifies  which  framebuffer device you want to read. If you do
          not use this option, it takes the  value  from  the  FRAMEBUFFER
          environment  variable. If no FRAMEBUFFER environment variable is
          given or if its value is NULL, then DEFAULT_FB  is  taken.  (see
          source code), which usually is /dev/fb0.

   -f filename
          Read from from file instead of device, requires that -w (width),
          -h (height) and -b (bitdepth) are specified.

   -h height
          the height of the frambeuffer in pixels, optional  when  reading
          from device.

   -i     turns off interlacing. If you do not want ADAM7 interlacing, you
          should use the -i option.

   -s seconds
          specifies how many seconds to wait before grabbing. fbshot  does
          not  lock console switching, so you can switch it while waiting,
          if you cannot use -c requires normally that  fbgrab  is  run  as

   -v verbose
          be verbose

   -w width
          the  width  of  the frambeuffer in pixels, optional when reading
          from device.

   -z     set png compression level 0 (fast) to 9 (best).


   * Low-end bit depths, eg 1, 2, 4 & 8 bits.

   * Companion program fbput that would display a  picture  in  the  fram‐

   * Better utilization of the PNG-lib, all formats are first converted to
   32 bitdepth and then stored as PNG - hardly the right approach.


   fbgrab fb.png

   will take a framebuffer snapshot, or if you don't have fbgrab  at  your
   machine, you can do

   cp /dev/fb0 framebuffer.dump

   and then

   fbgrab -w 1024 -h 768 -b 16 -f framebuffer.dump fb.png

   to convert it to a picture.


New February 12 2020

New June 16, 2015: Version 1.3 released!

News: Long overdue fixes finally released:

  • Added support when active framebuffer is not starting at offset 0
  • Fixed broken re-ordering of colors, rgba to argb
  • Fixed broken path for man page
  • Thanks to Peter Meerwald, David Hill and Konstantinn Bonnet who provided patches

New September 30, 2013: Version 1.2 released!


  • Write png file directly to stdout
  • Set png compression level with -z
  • Several improvements of Makefile for package maintainers and cross compiliation.
  • Thanks to Peter Meerwald and Bartlomiej Palmowski who provided good patches!

New May 2013: Version 1.1 released!


  • Better handling of framebuffers with non-standard ordering of the colors.
  • Now handles framebuffer with larger line length than actually used.
  • Now handles supports screenshots where picture is not at the top of the framebuffer, i.e. applications using hardware flips.
  • Added -v to provide some verbosity on what fbgrab is doing.
  • Now #includes zlib.h to adjust to changes in libpng.

To build you need:

  • zlib
  • libpng To run you have to enable the framebuffer in the linux kernel (if not already enabled). If you don't know how to do it, read the framebuffer howto.


Screenshots taken by fbgrab (click on image fo fullsize):


You can’t perform that action at this time.