VNC viewer jumping.

  • Thread starter Thread starter walkeraj
  • Start date Start date
W

walkeraj

Guest
Hi, I installed ProxmoxVE 1.1 on a box and I really love it, but I'm having a problem with the VNC viewer jumping around.

I followed the instructions here

http://www.64bitjungle.com/ubuntu/i...pdate-x-on-hardy-as-the-default-java-runtime/

To get the java plugin updated on my machine.

It works, and I can click "Open VNC Console" to see the console on the box, and that works. The problem is that it keeps jumping diagonally down and to the left. Immediately after opening, it jumps about 25px down and 5px right about every second or so. This makes it kind of difficult to use ;)
 
It's a javascript bug. The problem seems to be a bug with the way window.resizeBy() is being done in Firefox. It's causing a jump every time wresize() is called, even if it's window.resizeBy(0,0). The following fix works for me:

--- vnc-direct.htm 2009-05-06 18:57:02.000000000 -0400
+++ vnc-direct.htm 2009-05-06 18:56:14.000000000 -0400
@@ -46,8 +46,11 @@

document.vncapp.width = aw;
document.vncapp.height = ah;
-
- try { window.resizeBy (aw - ow, ah - oh); } catch (e) {}
+ var offsetw = aw - ow;
+ var offseth = ah - oh;
+ if ( offsetw !== 0 || offseth !== 0){
+ try { window.resizeBy (offsetw, offseth); } catch (e) {}
+ }
} else {
// other browsers
var oh = window.innerHeight;
@@ -55,8 +58,12 @@

document.vncapp.width = aw;
document.vncapp.height = ah;
-
- try { window.resizeBy (aw - ow, ah - oh); } catch (e) {}
+ var offsetw = aw - ow;
+ var offseth = ah - oh;
+ if ( offsetw !== 0 || offseth !== 0){
+ try { window.resizeBy (offsetw, offseth); } catch (e) {}
+ }
+
}

setTimeout ("wresize()", 1000);


---------
It still jumps a bit when you resize it, but only if you change the size to be other than the preferred size. Also, it avoids unnecessarily calling window.resizeBy()
 
Last edited by a moderator:
Yeah, I had the same problem until I turned off desktop effects. It would be nice to turn them back on (just for fun), so I'll try this fix out. 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!