3 ms·
On a unix system you can run any browser headlessly by using a headless X11 display such as Xvfb. Instead of having a real screen, Xvfb uses an in-memory frame
by syncsynchalt 10y ago
On a unix system you can run any browser headlessly by using a headless X11 display such as Xvfb.
Instead of having a real screen, Xvfb uses an in-memory framebuffer for screen output that you can screenshot etc if needed.
It's as easy as:
Xvfb :123 &
DISPLAY=:123 firefox
### firefox is now running and outputting
### to the framebuffer display on :123, and
### can be driven by WebDriver etc.
- zurn 10y agoFor practical use you want the xvfb-run wrapper script, and use a saner mode than the default 256-color one: xvfb-run --auto-servernum --server-args="-screen 0, 1024x868x24" firefox