xvfb的安装、配置、运行(Linux)

    xiaoxiao2021-03-25  278

    Xvfb

    时间:8/13/2016

    环境:Ubuntu13.0

    安装:

    方法一:sudo apt-get install xvfb

    方法二:sudo apt-get update && sudo apt-get install -y xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xvfb x11-apps  imagemagick firefox google-chrome-stable

    来源:http://www.tools138.com/create/article/20150313/020006784.html

     

    测试:

    在运行浏览器前,首先要设置DISPLAY环境变量,以指定xvfb运行在哪个显示设备上。在加入环境变量前

    export DISPLAY=:10   

    分配一个显示设备 10

     sudo Xvfb :10 -ac

    -ac代表关闭xvfb的访问控制

    firefox

    如果终端(terminal)没有显示错误,就说明已经成功运行Firefox在无显示设备的ubuntu上了。它会一直运行,直到使用ctrl + C或其它类似方法来终止其运行。同时,它不会有任何输出。

    来源:

    http://zhidao.baidu.com/link?url=wdNoKz-CTnB5WAkB8AwWYP6lS0Si3tbd8zbNGVNRWP4ojptLAQ-PSFWKXEDcKslR0-KjS_AnsTwxr1lbtciWREkoyY5gJba_sjaMz55SxXa

    http://www.tools138.com/create/article/20150313/020006784.html

     

    终端命令:

    xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt --url=http://www.sina.com.cn --out=localfile1.png --body-string=utf-8

    来源:http://www.tuicool.com/articles/eERN3q

     

     

    转载请注明原文地址: https://ju.6miu.com/read-7487.html

    最新回复(0)