Today I had a problem at work, one java application was supposed to be desktop environment agnostic but because it has bugs it throws AWT HeadlessException on ubuntu-server. As you know ubuntu-server doesnt have xserver installed.
I though that I could find an xserver implementation, which would be dummy and would fool my java application that is it running in desktop environment.
As it turns out ubuntu has in its repositories Xvfb type: sudo apt-get install xvfb
I dont think you even need xserver-xorg for this to work.
Xvfb :1 -screen 0 1024x768x8 &