VNC Client does not work properly on OS X

faceless

New Member
Jul 4, 2009
25
0
1
Hi there

This has been annoying me for months. The Java VNC client supplied with Proxmox doesnt' work properly under OS X - I thought it didn't work properly at all, but I've just tested it under a Windows VM and it's fine.

The issues are

1. Asssumptions are made about the size of the button panel at the top - it's bigger under OS X, and so the bottom line of the screen (the most important if you're in a console) is scrolled off the bottom

2. Most important, many of the function keys don't work. In particular ESCAPE, required to get into the GRUB boot menu, isn't working.

Do you guys have an OS X system there to test with?

Cheers... Mike
 
Yes, I can use an external client of course - although this requires logging on to the server and starting a VNC server manually each time I want to connect (due to the one-time password).

I can also fire up a Windows VM. But probably the best all round solution is fixing the bug :)
 
I use OS X to connect to PVE and occasionally have to re-initialize a VNC session due to the screen resolution bug. I just close the window and re-click on the VNC link and it works fine. I can test the Escape key problem, hang on a big here.

I just tested using F12 to select a boot device and it works fine in Safari 4.0.5. I *did* have to turn off dashboard from using F12 for it to work however. This was in an Ubuntu Desktop 9.1 VM.
 
Last edited:
The function keys are actually OK from memory, although I have very little call to use them. It's ESC that's killing me.

Note this is logging into to a console VNC server (eg a Linux box not running X). If you've got one handy, try logging in so you get a terminal window in the VNC client and see if it works (easy way to check: run vi, enter edit mode then try to get out of it to ed mode to exit
- I ended up having to reboot!).
 
we have no OS X here to test, but I would be happy if you send me us a mac book pro!
 
I can let you have remote access to an OS X machine to test things on if you would like. Or, refurbished Mac Mini's are pretty cheap. They go for $429USD on Apple's online store.
 
Hmm, that wasn't too hard. Diff below applies after your vncviewer.diff was applied to tightvnc 1.3.10 (attaching it too if I can get the forum attachment working):

Code:
diff -ubr vnc_javasrc.orig/RfbProto.java vnc_javasrc/RfbProto.java
--- vnc_javasrc.orig/RfbProto.java	2010-06-07 16:26:04.000000000 +0100
+++ vnc_javasrc/RfbProto.java	2010-06-07 16:26:40.000000000 +0100
@@ -1119,7 +1119,7 @@
 
       } else {
 
-	  if (evt.isActionKey()) {
+	  if (evt.isActionKey() || evt.getKeyCode()==KeyEvent.VK_ESCAPE) {
 
 	      //
 	      // An action key should be one of the following.
@@ -1147,6 +1147,7 @@
 	      case KeyEvent.VK_F10:       key = 0xffc7; break;
 	      case KeyEvent.VK_F11:       key = 0xffc8; break;
 	      case KeyEvent.VK_F12:       key = 0xffc9; break;
+	      case KeyEvent.VK_ESCAPE:    key = 0xff1b; break;
 	      default:
 		  return;
 	      }

That fixes the escape key issue - KEY_TYPED event is not firing for Escape on OS X. The window size thing I'll live with. Now I just need to figure out how to get the new Jar into the web application...
 

Attachments

  • patch.txt
    1.5 KB · Views: 3
Yes, I'd argue that it is: an equivalent for Solaris was filed here (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4734408). However this works around it without side effects - if KEY_TYPED is fired as I believe it should be, escape is picked up in the first block exactly as it was before. If it's not, it's now picked up in the second.

I run a Java ISV and we've had to work around quite a few of these over the years. I hope Proxmox are pragmatic enough to realise a fix is a fix, regardless of the cause, and include it with the next release... in the meantime I've filed a bug report with Apple and hopefully it will be picked up in their next release.
 
Hi Dietmar

Sorry, just saw your last reply. I've just broken one of my VMs (again) so I'm very please to report that this fix works. Thanks!

Cheers... Mike
 
Does the latest ProxMox have this fix? I'm running the current version (3.1-24) and I seem to have the same issue where escape does not work when I'm using VNC. This is an issue if you use vi and an editor. I've switched to nano when I'm in vnc but it would be great to see this resolved.

thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!