用Xvfb启动无头火狐不起作用 [英] starting headless firefox with Xvfb does not work

查看:194
本文介绍了用Xvfb启动无头火狐不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



$ xvfb-run firefox似乎有效。

所以我开始


Xvfb:1 -screen 0 1024x768x24&


然后是


set DISPLAY:= 1
env DISPLAY:= 1

仍然当我运行firefox我得到


错误:没有显示指定


我运行在centos 6和firefox 38 ESR上。



可以做什么?

使用--display arg启动firefox
$ b

  / usr / bin / firefox  - -display =:1 


I try to run firefox in headless mode for selenium.

$xvfb-run firefox seems to work.

I run firefox through selenium so i cannot run xvfb-run directly.

So i start

Xvfb :1 -screen 0 1024x768x24 &

and then

set DISPLAY:=1 env DISPLAY:=1

Still when i run firefox i get

Error: no display specified

I run on centos 6 and firefox 38 ESR.

What can be done?

解决方案

start firefox with --display arg

/usr/bin/firefox --display=:1

这篇关于用Xvfb启动无头火狐不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆