How to setup a headless application in Linux?
October 9, 2007
I am a newbie to Linux environment and do not know every commands available inside the shell.
This entry will explain and demonstrate to all newbies out there and to those who have not know to setup a headless application in Linux and for those who want to setup headless application in Linux.
Install the following in your Linux distro if you have not install them yet.
1. Xvfb
2. startx
3. import from ImageMagick Tools
Let’s try to run Firefox without a visible display.
1. Start Xvfb.
startx -- `which Xvfb` :1 -screen 0 1024x768x24
2. start Xvfb running on :1 with a screen size of 1024×768 and 24bits/pixel color depth.
DISPLAY=:1 firefox
3. Take a screenshot.
DISPLAY=:1 import -window root firefox.png
Thank you to Jordan Sissel for his blog regarding this problem.