Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to run Firefox in my server in order to execute some Selenium tests from Hudson. I would love no to have to install a complete gui. So I installed Xvfb in order to fake the Gui (I understand it this way correct me if my assumptions are wrong).

After some time trying to make it work, I'm stuck with the next situation:

$ sudo Xvfb -ac :99 &
[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)

$ firefox
[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
[config/dbus] couldn't register object path
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
Xlib:  extension "RANDR" missing on display ":99.0".
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: /bin/dbus-launch terminated abnormally without any error message)

I'm runnig firefox without installing it from the repositories. And I'm getting a socket timeout when I try to run the selenium tests, so I guess the problem is in Firefox and Xvfb.

I have installed already the nex package:

i   gconf-defaults-service                                                 - GNOME configuration database system (system defaults service) 

That in some forums suggest to be a fix, that in my case doesn't work.

Any explanation about the problem and ways of solving it without installing a full gui, will be very helpful.

share|improve this question
    
My mistake, I misunderstood your question. Does Firefox have to operate or be available? You could have it be a script that returns the proper exit code. –  Warner May 11 '10 at 14:59
    
I think it should operate, the requirements are given by Selenium RC which is the one that is going to use it. I'm going to check it anyway. –  Julio J. May 11 '10 at 15:01
    
What I understand from here seleniumhq.org/docs/05_selenium_rc.html is that it should work completely. –  Julio J. May 11 '10 at 15:03
    
I have "Xvfb -ac -screen 0 1024x768x24" and experiencing the same problem under hudson. How did you fix the problem? Could you please share the solution? –  user125594 Jun 21 '12 at 22:21

2 Answers 2

up vote 5 down vote accepted

You may try my way of starting up selenium and Xvfb. I create a bash script and save it as selenium.sh


#!/bin/sh

Xvfb :0 -screen 0 1024x768x24 2>&1 >/dev/null &
export DISPLAY=:0
java -jar /opt/selenium/selenium-server-1.0.3/selenium-server.jar -log /tmp/selenium.log

Then I run it the way I normal run bash scripts

$ sh selenium.sh

By the way, don't forget to include firefox on your PATH variable

share|improve this answer
    
Thanks, but I'm running Selenium from hudson with the Selenium Plugin for Hudson. –  Julio J. May 31 '10 at 7:33

I've resolved the problem. Apparently all the warnings and errors that Xvfb was throwing doesn't seem to have any importance.

I'd configured wrong the selenium tests launch process and the socket timeout came from that problem.

Now all it's running properly.

Thanks to every body for trying.

share|improve this answer
    
can you explain a little more about your solution i am stuck at the same problem –  user148288 Dec 4 '12 at 23:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.