Minecraft wiki entry for VPS, associated text: sudo apt-get build-dep xvfb
You will now have to add a deb-src repository to you /etc/apt/sources.list
sudo apt-get source xvfb
you will know get a directory called xorg-server-X.X.X we now need to patch the source.
wget https://bugs.launchpad.net/xorg-server/+bug/516123/+attachment/1126330/+files/xvfb-fbScreenInit-handling.patch
wget https://bugs.launchpad.net/xorg-server/+bug/516123/+attachment/1126331/+files/xvfb-randr.patch
You have to apply this patches in the right order
patch -p1 xorg-server-X.X.X/hw/vfb/InitOutput.c xvfb-fbScreenInit-handling.patch
patch -p1 xorg-server-X.X.X/hw/vfb/InitOutput.c xvfb-randr.patch
sudo apt-get install fakeroot
cd xorg-server-X.X.X
The next step will probably take hours.
dpkg-buildpackage -rfakeroot -uc -b
cd ..
dpkg -i xvfb_*.deb
sudo apt-get install libgl1-mesa-swx11 libxcursor1 libxrandr2 libxxf86vm1 x11-xserver-utils xfonts-base
Now try xvfb-run -a xrandr. If everything worked how its supposed to work you should get no errors.
For testing purpose install mesa-utils and try xvfb-run glxinfo and xvfb-run glxgears