sudo yum -y install firefox Xvfb Xorgyum -y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop"cf http://alexbischof.blogspot.com/2012/11/centos-installing-graphical-x-window.html- Launch an XWindows Virtual Frame Buffer(XVFB) session on display port 99:
Xvfb :99 -ac -screen 0 1280x1024x24 & - Tell all XWindows applications in this terminal session to use the new Xvfb display port:
export DISPLAY=:99
- First you need X11 or XQuartz. If you have an older version of Mac OS X then X11 should already be installed.
- If you are running Mountain Lion (OS X 10.8) or newer, then you can download XQuartz here: http://xquartz.macosforge.org/landing/
- Open XQuartz and ssh to your CentOS host using the
-Xoption, eg:ssh -X user@example.com - On the remote host, type
export DISPLAY=localhost:10.0 - Type
firefoxand after a long pause you should see Firefox start up. - Now if you start the selenium server in this terminal session, you will see Firefox start up when you run your tests.
Note that it's much slower to execute the tests under XWindows.
How is that headless? You install the whole graphical environment!