How to run html2image linux on Ubuntu64

Here is detailed example on how to use html2image linux on Ubuntu 64 bit (Ubuntu 7.10 – the Gutsy Gibbon)

This serves as a good example on how to use html2image. Other 64 bit Linux distribution can be done similarly.

1. Install Ubuntu 64

2. Login into the server (you can use the text mode login here. This is suitable for headless server as well)

If you are in GUI mode, Ctrl+Alt+F2 will switch you to text mode.

3. Enter a folder, download html2image

wget http://www.guangmingsoft.net/htmlsnapshot/html2image.i386.tar.gz

4. Extract html2image

tar xvzf html2image.i386.tar.gz
cd html2image
export LD_LIBRARY_PATH=./

4. Install 32bit application support libraries.

sudo apt-get install ia32-libs

5. Install Xvfb coming with the Ubuntu

sudo apt-get install xvfb

6. Run Xvfb

Xvfb :1 -screen 0 640x480x24 -nolisten tcp -audit 4 -auth X1.cfg & export DISPLAY=:1
Of course, you could try high resolution like 1024x768x24

7. Now you can run html2image, it should work
./html2image www.google.com a.jpg

Check if the a.jpg is created successfully.