Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xvfb failed to start in ubuntu

I trying to get a screen shot by using the following two tools (something relative to qt, webkit and etc. maybe)

  • https://github.com/adamn/python-webkit2png
  • http://cutycapt.sourceforge.net/

when run it on server using xvfb-run following the guide of them, I got the error: Xvfb failed to start

then I searched the situation and find a similar question here

xvfb run error in ubuntu 11.04

then try to add

--auto-servernum --server-num=1 

now the whole command is:

xvfb-run --auto-servernum --server-num=1 -server-args="-screen 0, 640*480*24" python webkit2png.py --url=http://google.com --out=test.png

but got another error: /usr/bin/xvfb-run: 187: kill: No such process

how to solve it ?

like image 498
Wei Lin Avatar asked Dec 07 '22 12:12

Wei Lin


2 Answers

It works when I remove "-server-args". Try doing that.

xvfb-run --auto-servernum --server-num=1 python webkit2png.py --url=http://google.com --out=test.png

This is the command you're looking for.

like image 125
user1072651 Avatar answered Dec 09 '22 01:12

user1072651


server-args option is wrong, in your case it should be :

--server-args="-screen 0, 640x480x24"

like image 44
Tof Avatar answered Dec 09 '22 00:12

Tof