"No X11 DISPLAY variable" - what does it mean?

I am trying to install a Java application on my Linux machine (Slackware).

I have received the following error, and I do not understand it.

Could you advise me how to approach the problem? Thank you.

Here is what I get: (I see that some X11 DISPLAY variable needs to be set, but what value should I give it and how?)

~$ java -jar gate-5.0-beta1-build3048-installer.jar

No X11 DISPLAY variable was set, but this program performed an operation which requires it.
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(Graphic
at java.awt.Window.<init>(
at java.awt.Frame.<init>(
at net.sourceforge.mlf.metouia.borders.MetouiaDotsBuf fer.<init>(
at net.sourceforge.mlf.metouia.borders.MetouiaDots.<i nit>(
at net.sourceforge.mlf.metouia.borders.MetouiaToolBar Border.<init>(
at net.sourceforge.mlf.metouia.MetouiaLookAndFeel.ini tComponentDefaults(
at javax.swing.plaf.basic.BasicLookAndFeel.getDefault s(
at javax.swing.plaf.metal.MetalLookAndFeel.getDefault s(
at javax.swing.UIManager.setLookAndFeel(UIManager.jav a:537)
at javax.swing.UIManager.setLookAndFeel(UIManager.jav a:581)
at com.izforge.izpack.installer.GUIInstaller.loadLook AndFeel(
at com.izforge.izpack.installer.GUIInstaller.<init>(G
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(
at java.lang.reflect.Constructor.newInstance(Construc
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
at com.izforge.izpack.installer.Installer.main(Instal


  • If you're on the main display, then

    export DISPLAY=:0.0

    or if you're using csh or tcsh

    setenv DISPLAY :0.0

    before running your app.

    Actually, I'm surprised it isn't set automatically. Are you trying to start this application from a non-graphic terminal? If not, have you modified the default .profile, .login, .bashrc or .cshrc?

    Note that setting the DISPLAY to :0.0 pre-supposes that you're sitting at the main display, as I said, or at least that the main display is logged on to your user id. If it's not logged on, or it's a different userid, this will fail.

    If you're coming in from another machine, and you're at the main display of that machine and it's running X, then you can use "ssh -X hostname" to connect to that host, and ssh will forward the X display back. ssh will also make sure that the DISPLAY environment variable is set correctly (providing it isn't being messed with in the various dot files I mentioned above). In a "ssh -X" session, the DISPLAY environment variable will have a value like "localhost:11.0", which will point to the socket that ssh is tunnelling to your local box.