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.
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.
3. Take a screenshot.
DISPLAY=:1 import -window root firefox.png
Thank you to Jordan Sissel for his blog regarding this problem.