How To Screenshot The Framebuffer On Raspbian

So, whilst writing a recent post, I needed to take a screenshot from the framebuffer device. After a bit of googling, the best option seemed to be using fbgrab, that saves the content of the framebuffer as a PPM file (an image in text format that I’ve never heard of).

It turns out fbgrab is not available on Raspbian, but an alternative is, fbcat, which works in a similar way. It can be installed with a simple apt-get install fbcat, and actually now doing a apt-get install fbgrab now redirects to fbcat as well.

Then, you simply specfy the framebuffer and redirect the output to a file, like so: “fbcat /dev/fb0 > test.ppm”. Finally, you can convert this file to a more standard image file using free online services, like convertio.

Job done.

Funnily enough, doing this made me realise I had two framebuffers going, showing the below: