3

My netbook have installed Debian linux without X.org. I need sometimes to make a screenshots-output of some scripts. I tried to use a framebuffer device for this purpose:

# cat /dev/fb0 > screenshot.raw

But problem that this .raw file is not a graphical format because it's not open even in Gimp. How it's possible to convert it to .png file, for example?

5

The format of the raw file you capture is going to depend on the bit depth and resolution.

There are a number of tools out there to do this. Debian has the fbcat package. You may need to sudo apt-get install fbcat to install it.

fbcat will grab the frame buffer in ppm format, so you can then use ppmtojpeg or similar to convert it to the format you want.

There's also a fbgrab wrapper which will save in PNG format.

  • Thank you so much Stephen. fbcat utility working as need... fbgrab generated a png file but it's not viewable(( – linuxxoid Jan 21 at 17:53
1

You can use the sudo setterm --dump command to print the content of the current tty into a text file, the default output is screen.dump file. The --file option can be used to get a custom output file name: sudo setterm --dump --file screen0.dump.

man setterm :

--dump [console_number]

Writes a snapshot of the virtual console with the given number to the file specified with the --file option, overwriting its contents; the default is screen.dump. Without an argument, it dumps the current virtual console. This overrides --append.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.