Super User is a question and answer site for computer enthusiasts and power users. 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 second X11 display port which is created by VNCServer on startup (vncserver :1 -geometry 1280x800); and I would like to start a GUI-only application on this second display at startup also.

How can I do this?

(the application in question is PS3MediaServer FYI)

share|improve this question

Most X applications take a -display or --display argument. Setting the DISPLAY environment variable supported by almost all X applications, since support for it is built into libX11's XOpenDisplay() API.

share|improve this answer
Thanks. PS3MediaServer appears to be a .jar executed by the JVM; how do I tell the JVM which X display to use? Like so? java blah.jar $DISPLAY=":1" ? – user33110 Aug 30 '10 at 5:12

Put this in a script and run it at startup:

DISPLAY=:1.0 ; export DISPLAY
java ...
share|improve this answer

You must log in to answer this question.