1

So I have an executable jar file which when run in windows or in Linux by using the command

 `java -jar filename.jar`

the output is this. But when the same thing is viewed via a remote connection using VNC client, the output is reduced to this

I have tried changing the resolution of the vncserver instance by using -geometry attribute and have also tried supplying values for "-cc" and the "-depth" attributes. But to no avail. Can someone tell me what I have to do so as to get the intended display properly in the vnc session as well?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Anand Sainath
  • 1,807
  • 3
  • 22
  • 48

2 Answers2

1

VNC Clients also have settings, like color depth etc, that effect the output quality. And it also depends on capabilities of VNC. Which SErver and and which client are you using? If you have set in in the VNCSErver, check the params of VNCViewer.

  • Yes. That's what I meant by setting the -cc and -depth attribute. I am using vnc viewer client. – Anand Sainath Jul 29 '11 at 11:05
  • You'll need to change your window manager. It seems you are using a older/primitive one like TWM etc. If that's the case you need to switch to GDM of KDM. – Rajesh Gautam PhD Jul 30 '11 at 08:40
  • I will try to do that and tell you if that solved the problem. But I dont know if I will have the administrative rights to do that [is root privilege needed for it?], bcos its a remote system.. – Anand Sainath Jul 30 '11 at 09:12
  • As an alternative, you can use X-protocol instead of VNC. If your client machine is also linux/unix, you need to to xhost+ and on the machine your app is running you need to do setenv DISPLAY client:0.0 (depending on your command shell syntax). Then launching app should show it in your client. There exist X-Servers for windows also. – Rajesh Gautam PhD Jul 30 '11 at 11:20
1

This may be seen when the GUI is not constructed on the event dispatch thread. The remote connection adds enough latency to expose the underlying problem.

Because the two images have differing dialog names, verify that both represent the same code. Also, check the remote server's .vnc log to see what window manager is being used.

Addendum: I'm not sure what VNC server your server is using, but you may be able to edit $HOME/.vnc/xstartup to specify the window manager. Gnome's Metacity has worked for me.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045