7

I am trying to start firefox headless. The following is the beginning of the shell script that starts it:

#!/bin/sh
Xvfb :99 >/dev/null 2>&1 &
XVFB=$!
sleep 3
firefox --display=:99 >/dev/null 2>&1 &
FIREFOX=$!

When this script is run, the following error occurs:

Xlib:  extension "RANDR" missing on display ":99".

I have tried starting Xvfb with the following, but it does not prevent the error:

Xvfb -extension RANDR :99 >/dev/null 2>&1 &

and

Xvfb +extension RANDR :99 >/dev/null 2>&1 &

Is there a better way to enable XRandR in Xvfb so that firefox is able to see the extension?

Alternatively, is there a way to disable XRandR in firefox?

2 Answers 2

2

Firefox now has a headless mode which doesn't require an X server (like Xvfb) at all. If you're reading this, you may want to investigate this as an alternative, as it's much simpler to work with.

1
0

Xvfb dose not implement Xrandr, the only way to enable is would be to implement it. So in that case just ignore this message or filter it out. Like

firefox | grep -v RANDR

or so...

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .