[pve-devel] [PATCH novnc] request size with vncshell and container console

Dominik Csapak d.csapak at proxmox.com
Wed May 24 12:30:49 CEST 2017


when opening the console*tab* on a host or a container,
give the current size to the vncproxy api call, so that the console
fills the entire tab

resizing the window/iframe does not resize the vnc console
(because libvncserver has no setDesktopSize support)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 ...nd-height-to-vncproxy-call-in-console-tab.patch | 33 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch

diff --git a/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch b/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
new file mode 100644
index 0000000..ed1f4c3
--- /dev/null
+++ b/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
@@ -0,0 +1,33 @@
+From d3da00817202a762de5bcd7cf14c38dceb30a301 Mon Sep 17 00:00:00 2001
+From: Dominik Csapak <d.csapak at proxmox.com>
+Date: Fri, 19 May 2017 08:53:56 +0200
+Subject: [PATCH 11/11] add width and height to vncproxy call in console tab
+
+to set the resolution we want
+
+Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
+---
+ app/pve.js | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/app/pve.js b/app/pve.js
+index 668835a..c10df4e 100644
+--- a/app/pve.js
++++ b/app/pve.js
+@@ -52,6 +52,13 @@ export default function PVEUI(UI){
+ 	    break;
+     }
+ 
++    if (this.resize == 'scale' &&
++	(this.consoletype === 'lxc' || this.consoletype === 'shell')) {
++	var size = this.getFBSize();
++	params.width = size.width;
++	params.height = size.height;
++    }
++
+     this.baseUrl = baseUrl;
+     this.url = url;
+     this.params = params;
+-- 
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 086ff43..e1b6664 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
 0008-focus-canvas-after-load.patch
 0009-decrease-animation-time.patch
 0010-use-only-app.js.patch
+0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
-- 
2.11.0





More information about the pve-devel mailing list