Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have a 3rd party java app that I need to run on a remote server. Unfortunately, the app is designed for the desktop and assumes a GUI is available. The thing is I would like to leave this app running on the remote server without having to tie up my desktop machine with a persistent VNC connection to the remote machine.

I'm trying to setup Xvfb on the remote machine so emulate a graphical environment, connect to the remote machine via VNC to launch the app and configure parameters and then log off and let it run. Here's what I have so far: I have ubuntu 11.04 server apt-get install xvfb apt-get install fluxbox apt-get install x11vnc

Xvfb :1 -screen 0 1024x768x16 & fluxbox &

At this point I run into a problem because it gives a very undescriptive error: Cannot connect to server. How do I know if the server is running and that it's running properly?

share|improve this question

Set the DISPLAY environment variable to :1 when starting your Java app, so that it starts on your Xvfb server.

share|improve this answer

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.