1

I am using Ubuntu 12.04 machine installed with java8 version. I've installed 389 Ldap server, but when I am trying to execute command 389-console, iam getting below error:

Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.JFrame.<init>(JFrame.java:189)
    at com.netscape.management.client.console.Console.<init>(Unknown Source)
    at com.netscape.management.client.console.Console.main(Unknown Source)

I even ran command DISPLAY=:0.0, but still getting above error only while executing 389-console

Please tell me how to fix above?

John
  • 281
  • 1
  • 4
  • 9
  • Did you _export_ the `DISPLAY` variable? Is X running on your system? Are you logged in to a graphical console or via SSH? If via SSH do you have X port forwarding on? – Jim Garrison Jun 21 '16 at 19:27
  • @JimGarrison iam using ssh, how to check X port forwarding on? – John Jun 21 '16 at 19:30
  • Try using the `-Y` option when setting up the SSH connection. This will work only if the local system is running XWindows. If the local system is Windows you must have an XServer installed and configured (i.e. Cygwin-X or some other XServer) – Jim Garrison Jun 21 '16 at 19:33
  • @JimGarrison My local machine is ubuntu 14.04 and iam doing ssh into another ubuntu mahcine ( which is 12.04 ). Could you please tell what should I do? – John Jun 21 '16 at 19:35
  • Please check: https://stackoverflow.com/questions/662421/no-x11-display-variable-what-does-it-mean – Syed Muzamil Nov 30 '22 at 12:29

1 Answers1

1

maybe its already late but the question was still not answered so i will answer it for anyone who follows this link.

When logging into the server try using the -X flag

ssh -X username@hostname

Hope it helps

Mohan
  • 4,677
  • 7
  • 42
  • 65