• Register
0 votes

Problem :

I have installed Java application on my Linux machine and now i am receiving following error :

no x11 display variable was set, but this program performed an operation which requires it.

6.9k points

2 Answers

0 votes

Solution :

To resolve the issue you should enable X11 forwarding in your PuTTy

Now to do that please open PuTTy also go to Connection => SSH => Tunnels and do check mark the Enable X11 forwarding

Also do sudo to the server and export the following variable also note here IP is your local machine's IP

export DISPLAY=

enter image description here

36.1k points
0 votes

When you are exporting the Display to other machines, make sure you have entered the command xhost+ on that machine. This command allows the other machines to export their display on this machine. There can be many security constraints. You need to check ssh –X MachineIP is not required by xhost +?


Sometimes JCONSOLE does not allow all its processes. Since those JVM run with different users and you are trying to export the DISPLAY with another user. So it is better to follow C_DIR > sudo./jconsole.


In was ( WEBSPAHERE); jconsole was not able to connect its java server process. At that time just go to the link, and then try again to connect. It is also possible that this page is initializing some variables to enable jconsole to connect with the server.

WAS -> Console -> Application servers -> server1 -> Process definition -> Java virtual machine.

NX clients for windows:

  • Through this Windows machine, Connect to Unix box where GUI console is available.
  • Move SSH to the AIX box from the UNIX box.
  • Set the display like “export DISPLAY = UNIXMACHINE:NXClientPORTConnectedMentionedOnTitle”
  • Now when you launch any program, that requires DISPLAY, it will be launched on the UNIX box.


3.9k points

Related questions

0 votes
1 answer 9 views
Problem: I am naïve to C# programming. I am trying to use the auto-implemented properties. I think the best ever way to fix below error is to declare my own backing variable? Please find below my C# code: public Point Origin { get; set; } ... unchanged. To resolve this error, store the result of the expression in an intermediate value, or use a reference type for the intermediate expression.
asked Jul 23 Raphael Pacheco 2.3k points
0 votes
1 answer 1.3K views
Problem : I am trying to run startx via PuTTY and Xming but it gives following error: putty x11 proxy: unable to connect to forwarded x server: network error: connection refused
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 34 views
Problem : I am very new to the Linux but want to set up my MySQL databases on the Amazon ec2 instance. I have followed some directions I found about resetting a user login pass by using a --skip-grant-tables option of the MySQL. Now I want to add my user ... HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement How can I turn above option off?
asked Jan 30 jwilliam 3.9k points
0 votes
1 answer 29 views
Problem : Facing following error this application failed to start because it could not find or load the qt platform plugin "xcb"
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 57 views
Problem : I am trying to run my registration jsp page with the servlet. But it is throwing following error: The server encountered an internal error that prevented it from fulfilling this request. java.lang.NullPointerException com.java.task11.utils.ValidateUtil.EmailVal( ... .tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:62) I am unable to figure out why this is happening? Any clues?
asked Dec 2, 2019 alecxe 7.5k points