![]() |
How to take a screenshot with /dev/fb0
I would like to take a framebuffer screenshot
from the command line and have been trying to use Code:
cp /dev/fb0 filebut keep winding up with a screenshot of whatever is on the tty2 screen. How do I specify tty1's screen? I am aware that I could use /dev/vcs1 to do this but that only gives me a text representation instead of a raw screen dump that I can then later convert to PNG. |
perhaps you could do...
*CTRL-ALT-F2* sleep 2 && cp /dev/fb0 file *CTRL-ALT-F1* |
why not use fbdump as you can see it should do what you want
Code:
keithhedger@SlackHolly:~-> fbdump --help |
I would have bet a lot of money that someone would recommend delaying the snapshot long
enough to revert to the Alt-F1 screen so /dev/fb0 would refer to the proper screen. That does give me a nice 3MB or so raw file which can be converted to .png as follows: Code:
iraw2png 1024 768 < screenshot.raw > screenshot.pngI was under the impression that there were several /dev/fb's since multi-screen comfigurations are possible but in /dev there is only one; fb0. Apparently multi-screen is only available in xorg with a xorg.conf file altered to indicate multiple screens. Kind of makes me wonder just what difference there is between /dev/vcs1... and /dev/fb0. Only /dev/fb0 will get you a raw screen dump whereas /dev/vcs... will only get a text representation of the screen and no graphics. |
Sorry fbdump is available at slackbuilds.org
|
| All times are GMT -5. The time now is 04:55 PM. |