Wednesday, 10 July 2013

Headless Xvfb + x11vnc and XTEST Not Found

I just wanted to post my findings with the A6 rev of the BeagleBone (white). If no LCD/DVI cape is attached, then the boot doesn't load a frame buffer (/dev/fb0). As such, no X11 server starts up. x11vnc requires a real X11 server to be running for it to work. There is also the program xvnc which can create a virtual X11/frame buffer on your behalf, but I couldn't see it in the Angstrom packages.
 
So, I installed Xvfb - and created a virtual frame buffer. Install the package
xserver-xorg-xvfb
 
When starting, keep in mind (for the newbies like me coming from Windows), it is case-sensitive. To create a virtual X11 server;
Xvfb :1 -screen 0 1024x768x16 &
When you do this, you will probably get these errors;
(EE) AIGLX error: dlopen of /usr/X11/lib/dri/swrast_dri.so failed (dlopen(/usr/X11/lib/dri/swrast_dri.so, 5): image not found)
(EE) GLX: could not load software renderer
So, load the package;
mesa-dri-driver-swrast
 
OK, error gone. Now we can export our display (an environment variable so Firefox, or whatever X11 client you run, can attach to the display).
export DISPLAY=:1
 
Load up Firefox (something to see)
firefox &
 
And now we try and start the x11vnc;
x11vnc -display :1 -bg -nopw -xkb
 
At this point, with this distro, you'll see an error about XTEST not being found/not available when it was built. Here describes the issue;
 
I made sure that I had all the proper libraries installed, so I figured it must have been a bad build on Angstrom. So, now to build it myself. I ensured all required libraries were available; these are the ones ending with '-dev'; by default they all appeared to be available. I followed the instructions here;
 
Except the copy line didn't work too good for me, so do what you need to do to copy it to the /usr/bin folder.
 
Now it starts, and there are no errors about XTEST, and the input works!

No comments:

Post a Comment