LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fbgrab

capture framebuffer screenshots to PNG

TLDR

Take a screenshot of the current framebuffer
$ fbgrab [screenshot.png]
copy
Take a screenshot from a specific framebuffer device
$ fbgrab -d [/dev/fb1] [screenshot.png]
copy
Take a screenshot of a specific virtual console
$ fbgrab -c [1] [screenshot.png]
copy
Wait 5 seconds before taking a screenshot
$ fbgrab -s [5] [screenshot.png]
copy
Convert a raw framebuffer dump to PNG
$ fbgrab -w [1920] -h [1080] -b [32] -f [framebuffer.dump] [screenshot.png]
copy
Set PNG compression level (0=fast, 9=best)
$ fbgrab -z [9] [screenshot.png]
copy

SYNOPSIS

fbgrab [options] filename

DESCRIPTION

fbgrab reads the Linux framebuffer device (/dev/fb*) or a dump thereof and saves a PNG image file. It can capture screenshots of virtually any application, from traditional text applications to X-windows desktops and framebuffer applications.The tool is particularly useful for capturing screenshots on systems without a running X server, embedded systems, or when working directly with the Linux console.

PARAMETERS

-?

Display usage information.
-a
Ignore the alpha channel. Useful for pixel formats like BGR32 where drivers incorrectly report alpha.
-b bitdepth
The number of bits per pixel. Optional when reading from device.
-c console
Specifies which console (virtual terminal) to grab.
-C console
Switch console with a delay before capturing.
-d device
Framebuffer device to use. Defaults to FRAMEBUFFER environment variable or /dev/fb0.
-f filename
Read from file instead of device. Requires -w, -h, and -b options.
-h height
The height of the framebuffer in pixels. Optional when reading from device.
-i
Turns off ADAM7 interlacing in the output PNG.
-l linelength_
Line length (stride) in pixels between the start of each row. Optional when reading from device.
-s seconds
Seconds to wait before grabbing the screenshot.
-v
Enable verbose output.
-w width
The width of the framebuffer in pixels. Optional when reading from device.
-z compression
Set PNG compression level (0=fast, 9=best).

INSTALL

sudo apt install fbcat
copy
sudo pacman -S fbgrab
copy
sudo apk add fbgrab
copy
sudo zypper install fbcat
copy
nix profile install nixpkgs#fbcat
copy

CAVEATS

The -c option may require root privileges or the CAPSYSTTY_CONFIG capability. When reading from a raw dump file, the -w, -h, and -b options must all be specified. The framebuffer device must be accessible with appropriate permissions.

HISTORY

fbgrab was written by Gunnar Monell as a rewrite of fbshot by Stephan Beyer. The tool has been maintained since 2002 and is licensed under GPL version 2.

SEE ALSO

scrot(1), import(1), fbi(1), fbset(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid