Nishadh KA

Xvfb Virtual FrameBuffer error for Ubuntu server 1204

2013-10-07


The frame buffer is a hardware portion in memory to provide a display. X window systems are the basic display setup for computers. The display in the computer is organized as bitmap windows. In headless Ubuntu servers, virtual framebuffers are used for the application which requires display explicitly such as for Firefox or other browsers. Xvfb provides a virtual display for those applications. In Ubuntu headless server (server without any GUI) this is installed for mainly running Selenium scripts which require a browser to run. Installation in Ubuntu 12.04 is following this http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/ and followed the commands

sudo apt-get install xvfb
sudo Xvfb :10 -ac
firefox
export DISPLAY=:10

However, somehow after a reboot, it shows error.

[dix] could not init font path element /usr/share/fonts/x11/misc, removing from list!
could not init font path element /usr/share/fonts/x11/cyrillic, removing from
[dix]
list!
[dix] could not init font path element /usr/share/fonts/x11/100dpi/:unscaled,
/:unscaled, removin
removing from list!
[dix] could not init font path element /usr/share/fonts/x11/75dp
ig from list!
[dix] could not init font path element /usr/share/fonts/x11/type1, removing
from list!
ot init font path element /usr/share/fonts/x11/75dpi, removing from list!
[dix] could not init font path element /usr/share/fonts/x11/100dpi, removing
from list!
[dix] could 

Though it is not working but after waiting for some time, it seems starting the display, anyhow I move forward to the error and installed the following package to resolve the error based on

http://blog.martin-lyness.com/tag/xvfb

sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
sudo apt-get install xserver-xorg-core

moreover, followed this for final touch up http://www.guguncube.com/2733/python-spynner-installation-in-ubuntu so installed

sudo apt-get install -y x11-xkb-utils
sudo apt-get install -y xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
sudo apt-get install -y x-ttcidfont-conf cabextract ttf-mscorefonts-installer
sudo dpkg-reconfigure --default-priority x-ttcidfont-conf

Then in different terminal ssh’d to run the display and then the Firefox, now it working, otherwise, it gets much error. Like RAND is not working. Another tip: to show the hidden file by cmd, use ls -a

References

  1. http://stackoverflow.com/questions/17944234/xlib-extension-randr-missing-on-display-21-trying-to-run-headless-googl
  2. http://askubuntu.com/questions/131051/how-to-kill-and-to-start-the-x-server
  3. http://permalink.gmane.org/gmane.comp.multimedia.puredata.general/88691
  4. http://www.guguncube.com/2733/python-spynner-installation-in-ubuntu
  5. http://veeraramkumar.blogspot.in/2011_06_01_archive.html
  6. https://github.com/daneroo/phantom-test
  7. http://serverfault.com/questions/239597/xvfb-error-on-ubuntu
  8. http://ubuntuforums.org/archive/index.php/t-1956577.html
  9. http://ivanvillareal.com/linux/xvfb-and-firefox-headles-screenshot-generator/
  10. http://blog.martin-lyness.com/tag/xvfb
  11. http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/