[pve-devel] [PATCH manager] allow width and height parameter for vncshell
Dominik Csapak
d.csapak at proxmox.com
Wed May 24 12:30:47 CEST 2017
so that novnc can request a different screen size
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Nodes.pm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index a45ca6db..d33b9fd7 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -617,6 +617,20 @@ __PACKAGE__->register_method ({
type => 'boolean',
description => "use websocket instead of standard vnc.",
},
+ width => {
+ optional => 1,
+ description => "sets the width of the console in pixels.",
+ type => 'integer',
+ minimum => 16,
+ maximum => 4096,
+ },
+ height => {
+ optional => 1,
+ description => "sets the height of the console in pixels.",
+ type => 'integer',
+ minimum => 16,
+ maximum => 2160,
+ },
},
},
returns => {
@@ -684,6 +698,14 @@ __PACKAGE__->register_method ({
'-timeout', $timeout, '-authpath', $authpath,
'-perm', 'Sys.Console'];
+ if ($param->{width}) {
+ push @$cmd, '-width', $param->{width};
+ }
+
+ if ($param->{height}) {
+ push @$cmd, '-height', $param->{height};
+ }
+
if ($param->{websocket}) {
$ENV{PVE_VNC_TICKET} = $ticket; # pass ticket to vncterm
push @$cmd, '-notls', '-listen', 'localhost';
--
2.11.0
More information about the pve-devel
mailing list