2

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.

Julio J.
  • 45
  • 2
  • 7
  • 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 http://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? –  Jun 21 '12 at 22:21

2 Answers2

6

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

2

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.

Julio J.
  • 45
  • 2
  • 7
  • can you explain a little more about your solution i am stuck at the same problem –  Dec 04 '12 at 23:12