Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Invocation:

 Xvfb -fbdir . &

Result

_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 http://www.j2ee.me/developer/technicalArticles/J2SE/Desktop/headless/ gets me this error:

(.:31027): Gtk-WARNING **: cannot open display:
share|improve this question

1 Answer 1

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

 
discard

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.