Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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'm running a java application on my ubuntu server which refuses to open if it cannot open a window (the content of the windows is of no interest for me). Since the server is not connected to any screen I don't want to have a full running x11 environment like openbox. Currently I'm forwarding this window over ssh to my pc but this way the program closes whenever I'm rebooting the pc. What could be a good solution for this? (I'll never need to see the content of the window)

share|improve this question
Is there an option on the command line to disable this requirement? – Karlson Sep 19 '12 at 17:10
Related (maybe not exact duplicate because there might be something specific to Java): How can I run Firefox on Linux headlessly (i.e. without requiring libgtk-x11-2.0.so.0)? – Gilles Sep 19 '12 at 23:48

Xvfb is an X server intended for situations like yours.

share|improve this answer
Debian and Ubuntu's xvfb package includes a script, xvfb-run, which will automatically launch an Xvfb instance and run your program with $DISPLAY pointing to that instance. – Jim Paris Sep 19 '12 at 18:37

You have to use a headless jre, e.g. the package default-jre-headless.

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.