LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-14-2011, 10:00 AM   #1
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 355

Rep: Reputation: 30
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 file
I have been switching to tty2 with Alt-F2 to do this
but 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.
 
Old 12-14-2011, 10:55 AM   #2
ahmadj
Member
 
Registered: Jun 2010
Distribution: Slackware64_13.37 \ Slackware_13.1 \ ARMedslack_13.37
Posts: 80

Rep: Reputation: 16
perhaps you could do...

*CTRL-ALT-F2*
sleep 2 && cp /dev/fb0 file
*CTRL-ALT-F1*
 
Old 12-14-2011, 11:22 AM   #3
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 830

Rep: Reputation: 167Reputation: 167
why not use fbdump as you can see it should do what you want
Code:
keithhedger@SlackHolly:~-> fbdump --help
fbdump 0.4.2

(c) Richard Drummond 2001-2007

Dumps the contents of the framebuffer to stdout as a PPM file.
Usage:
  -fb <string>   Path to the framebuffer device to dump is <string>
  -vt <n>        Bring virtual terminal no. <n> to the foreground before dumping
  -delay <n>     Wait <n> seconds before dumping
  --help         Show this help
 
Old 12-14-2011, 06:14 PM   #4
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 355

Original Poster
Rep: Reputation: 30
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.png
I tried fbdump --help but apparently I don't have that on my Slack 13.37 64 bit system.

I 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.
 
Old 12-15-2011, 04:30 AM   #5
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 830

Rep: Reputation: 167Reputation: 167
Sorry fbdump is available at slackbuilds.org
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Squeeze with xserver-xfbdev but no /dev/fb0 so no X ukiuki Debian 7 10-18-2013 03:11 AM
/dev/fb0: No such file or directory hellocatfood Linux - Software 4 01-17-2011 07:16 AM
/dev/fb0: No such device but i can see it marius_c Linux - Software 5 02-17-2010 11:58 PM
/dev/fb0 Not found when first running X CD1212 Linux From Scratch 4 01-17-2010 07:56 PM
/dev/fb0: No such file or directory mukeshj Linux - Software 2 09-04-2005 11:15 AM


All times are GMT -5. The time now is 11:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration