Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xvfb failed start error

Tags:

linux

ubuntu

I have Ubuntu 11.04 I am trying to install Xvfb and CutyCapt in order to take a snapshot of webpage I followed a instruction https://github.com/jaequery/cutycapt-installer-script-on-ubuntu/blob/master/install and I executed last line and it gives me an error

xvfb-run: error:Xvfb failed to start

Any solution for that? Thank you in advance

like image 725
user1413449 Avatar asked May 24 '13 00:05

user1413449


People also ask

What is xvfb used for?

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output.

How do I stop xvfb?

Starting the browser and executing the unit tests works very well. After executing the tests karma terminates the spawned browser instance - in my case the script that launched firefox over xvfb-run. In the above script you can see that I registered a trap to kill the launched firefox on exit of my script.


Video Answer


3 Answers

I was getting this error "xvfb-run: error: Xvfb failed to start" on Ubuntu 14.04, where previously my script had run without problems on Ubuntu 12.04.

My scripts were running calling xvfb-run multiple times, but I was seeing fails due to the error "Server is already active for display 99"

It seemed that the Xvfb wasn't ending when the xvfb-run command returned.

My solution was to use "xvfb-run -a [mycommand]" so xvfb uses another display if 99 is in use.

like image 68
Tom Avatar answered Oct 08 '22 14:10

Tom


Had the same issue, solved it by running this instead:

xvfb-run --auto-servernum --server-num=1 [your script]

--auto-servernum : Try to get a free server number, starting at 99, or the argument to --server-num

like image 29
kakhkAtion Avatar answered Oct 08 '22 15:10

kakhkAtion


Run xvfb-run -e /dev/stdout [mycommand] as @wumpus suggested.

I received the server lock message:

Fatal server error:
Could not create server lock file: /tmp/.X99-lock

xvfb-run: 

error: Xvfb failed to start

Using sudo resolved the issue for me:

sudo xvfb-run -e /dev/stdout [mycommand]
like image 24
absynce Avatar answered Oct 08 '22 15:10

absynce