Programmers learn & share
0 votes
153 views

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.

by (6.9k points)   | 153 views

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=10.75.75.75:0.0

enter image description here

by (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 +?

Reasons:

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.

WEBSPHERE:

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.

 

ago by (3.2k points)  
2,245 questions
2,807 answers
60 comments
241 users