无法在无头的Ubuntu服务器9.10中运行Firefox

我需要在我的服务器上运行Firefox,以执行哈德森的一些Seleniumtesting。 我不想安装一个完整的gui。 所以我安装了Xvfb来伪造Gui(我这样理解,如果我的假设是错的,那就纠正我)。

经过一段时间的努力,我坚持下一个情况:

$ 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) 

我runnig firefox没有从存储库安装它。 当我尝试运行seleniumtesting时,我得到一个套接字超时,所以我想这个问题是在Firefox和Xvfb。

我已经安装了nex软件包:

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

在一些论坛build议是一个修复,在我的情况下是行不通的。

如果没有安装完整的gui,解决这个问题的方法和解决方法将会非常有帮助。

你可以尝试我的方式来启动selenium和Xvfb。 我创build一个bash脚本并将其保存为selenium.sh


 #!/ bin / sh的

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

然后,我以正常运行bash脚本的方式运行它

 $ sh selenium.sh

顺便说一下,不要忘记在你的PATHvariables中包含firefox

我已经解决了这个问题。 显然所有的Xvfb抛出的警告和错误似乎没有任何重要性。

我configuration了错误的seleniumtesting启动过程和套接字超时来自这个问题。

现在它运行正常。

感谢每一个尝试的机构。