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?

Utkonos
  • 332
  • 3
  • 12

2 Answers2

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.

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...

Tim
  • 1
  • or maybe not, see https://stackoverflow.com/questions/12644001/how-to-add-the-missing-randr-extension – Tim Oct 31 '17 at 11:19