gizmodo
gizmodo

Reputation: 51

xvfb install on Linux

I am trying to get Selenium to do some automated browsing on a Linux application server. I am stuck at the point where my 'perl recording' from Selenium sends a request to start the browser, and the standalone selenium server throws an error - 'Timed out waiting for profile to be created!'.

I understand from browsing this error, that I could resolve this by creating a profile for the firefox browser I installed on the linux server. However, when I try to create a profile, I now get the error -

Error: no display specified

When I look this up, I find SO posts that suggest I could resolve this by installing xvfb first on the server and then setting the DISPLAY variable before starting the selenium server. However, I am not a root user, and wanted to check if xvfb can be installed locally on a user's home directory.

Upvotes: 5

Views: 6001

Answers (2)

Mahattam
Mahattam

Reputation: 5763

First need to install X window system frame buffer x server:

yum install xorg-x11-server-Xvfb.x86_64

make sure you have firefox installed, then start the x server on some display port like 99

Xvfb :99 -ac -screen 0 1280x1024x24 &

Set the DISPLAY environment to 99 by export DISPLAY=:99 in your code or maybe in bash profile.

Upvotes: 3

Xiaowei Song
Xiaowei Song

Reputation: 161

try Xdummy to launch X server in virtual frame buffer, it does not need root.

http://www.karlrunge.com/x11vnc/Xdummy

Upvotes: 2

Related Questions