Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get an X server going on a headless box and I'm using Xvfb.


 Xvfb -fbdir . &


_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
Could not init font path element unix/:7100, removing from list!

Message when quitting:

FreeFontPath: FPE "built-ins" refcount is 2, should be 1; fixing.

Core Problem:

Attempting to run the headless Java test(I have another program that I'm actually trying to run, but this sample code reproduces the error) at gets me this error:

(.:31027): Gtk-WARNING **: cannot open display:
share|improve this question
up vote 1 down vote accepted

I know this sounds dumb, but did you try chown root:root /tmp/.X11-unix to address that first warning when starting up?

Also, I think you're not using the appropriate DISPLAY variable when launching your program. Try Xvfb -display :1, then DISPLAY=:1 ./yourprogram and see if that works.

If display :1 is taken, try :2, etc.

Alternatively, you could consider VNC as it serves roughly the same purpose.

share|improve this answer
The DISPLAY variable appears to fix it. chown to root is strictly denied to me. – Paul Nathan Sep 18 '09 at 7:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.