0

I learned recently how to use Xvfb virtual Linux framebuffer:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=261264

I want gstreamer fbdevsink output into a virtual framebuffer, but that needs a device specified. But virtual framebuffers do not have /dev/fbX links.

So is output of fbdevsink to virtual framebuffer possible? If so, how?

Xvfb option "-fbdir /var/tmp" option allows for read access to xwd-header prefixed virtual framebuffer:

tail --bytes $((1360*768*4)) /var/tmp/Xvfb_screen0 > /dev/fb0

The xwd-prefix is 3232 bytes long, and writing a single byte to /var/tmp/Xvfb_screen0 results in a bus error:

$ Xvfb :1 -screen 0 1360x768x24 -fbdir /var/tmp &
[1] 2117
$ DISPLAY=:1 xclock -update 1 &
[2] 2124
$ Warning: Missing charsets in String to FontSet conversion

$ echo -n "x" > /var/tmp/Xvfb_screen0 
$ (EE) 
(EE) Backtrace:
(EE) 
(EE) Bus error at address 0x75f22c04
(EE) 
Fatal server error:
(EE) Caught signal 7 (Bus error). Server aborting
(EE) 
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 692 requests (94 known processed) with 0 events remaining.

[1]-  Aborted                 Xvfb :1 -screen 0 1360x768x24 -fbdir /var/tmp
[2]+  Exit 1                  DISPLAY=:1 xclock -update 1
$

I was not able to find the source code of Xvfb, where can I find it?

Your Answer

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

Browse other questions tagged or ask your own question.