• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot use Java GUI via x11 on RHEL6+  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I've ran into a problem using my Java application with a Swing GUI over x11.
On RHEL5.5, SUSE, AIX, etc, I can set DISPLAY to the name of my windows machine, give a port number, and run the Java application.
It display the GUI on my windows machine, allowing me to use the program remotely with no problems.

However, I am unable to do this from RHEL6.1 onwards.
It will run the application but no Java GUI will display on my windows machine.
I know x11/display is working, as I can launch "xterm" and that will display on the windows machine.

I have tested it by creating a simpleapplication with a JOptionPane popup, which displays locally on RHEL6.1, but not via x11.
I have also tried this with Java 1.6 and 1.7 and get the same result.

Has anyone ran into this before? Am I missing any packages? or is this a problem with Java?

Thanks in advance
 
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brad Hoff wrote:I have tested it by creating a simpleapplication with a JOptionPane popup, which displays locally on RHEL6.1, but not via x11.


Sorry. If you're displaying Swing locally on Linux, you are doing it via X11. The Java ui libraries are X clients and do not talk directly to the hardware even when running local.

Most likely, if you're using display name instead of IP address to identify the (Windows) X server, it's not resolving the name or the IP address isn't usable (for example, it's a general NAT address).

I haven't done much with X as a Windows server, since there's no FOSS Windows X server and I tend to work places where they're too cheap to buy something, so my primary expertise on the matter is as a remote X server for Unix/Linux systems.

You might want to look at this: http://aruljohn.com/info/x11forwarding/ which does talk a little about the challenges of running X from Windows. I am presuming that your channel to the server is via SSH, since running a straight connection to port 6000 is a security issue of the first degree and has been considered such for many years.

 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Can you get any GUIs to display on your local machine? Is the problem getting things to appear on a distant machine?
 
Brad Hoff
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Admittedly I'm not much of a unix person so you may be right about doing it via x11.

But I mean, if I'm on that machine (the RHEL machine), it works.
If I'm via a remote machine (win machine via telnet), it doesn't work.

It is resolving the name as it works if I launch non Java programs.
Interestingly, "xterm" does work but "xhost" does not work.

However I have tried this with Xming Server, and it works in all cases, so I think it is an issue with the previous X client.
 
Tim Holloway
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most likely cause of the problem that I can think of would be failure to establish proper host addressing and access (where "host" means the Windows machine).

However, the Linux UI system has been in the process of major overhaul for some time so it's possible that the RHEL6 server isn't compatible with your Windows X server. I think it unlikely at RHEL6 or even 7, but the latest Rasbian OS for Raspberry Pi did have the long-awaited changes and it no longer manages X the way I've been used to all these years. I'm still trying to figure out all the differences there.

I don't (usually) host X apps on my CentOS 6/7 servers, and I don't have Windows apps using X, so the help I can offer there is limited, alas.

I wouldn't yet say that X remote apps are dying, but the more popular way to do that kind of stuff these days is via AJAX webapps, where the actual GUI system underneath all the JavaScript and HTML is mostly immaterial.
 
Bartender
Posts: 1603
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just tried, running the java app on a Centos 6 platform, and MobaXterm on Windows 10 - worked fine.






 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!