donabela
donabela

Reputation: 9

How to set "X11 DISPLAY variable was set"?

I'm trying to remote into my raspberry with netbeans in Windows 10, but there is a report like this picture. I have received the following error, and I do not understand it. I see that some X11 DISPLAY variable needs to be set, but what value should I give it and how? I ever to trying with XMING but still same.

How can I fix this?

Connecting to 192.168.137.75:22 cmd : cd '/home/pi/NetBeansProjects//Gcrypt'; '/usr/bin/java' -Dfile.encoding=UTF-8 -jar /home/pi/NetBeansProjects//Gcrypt/dist/Gcrypt.jar Exception in thread "AWT-EventQueue-0" 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 gui.Main.<init>(Main.java:21) at gui.Main$4.run(Main.java:162) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Upvotes: 0

Views: 18246

Answers (1)

andzun
andzun

Reputation: 21

The solution is in the error message: No X11 DISPLAY variable was set, but this program performed an operation which requires it.

first set the DISPLAY variable with this command, than run your program

export DISPLAY=yourRemoteHostHere:0.0

Upvotes: 1

Related Questions