Run applications headless

in

Install the following: Xvfb, startx, import (from ImageMagick)
Now let’s try to run Firefox without a visible display.

  • Start Xvfb.
 startx -- `which Xvfb` :1 -screen 0 1024x768x24
  • start Xvfb running on :1 with a screen size of 1024×768 and 24bits/pixel color depth.
 DISPLAY=:1 firefox
  • Take a screenshot.
 DISPLAY=:1 import -window root firefox.png

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.