[pve-devel] applied: [PATCH container] allow width and height parameter for vncproxy

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jun 2 09:17:52 CEST 2017


applied

On Wed, May 24, 2017 at 12:30:48PM +0200, Dominik Csapak wrote:
> so that the novnc console can request a different screen size
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/API2/LXC.pm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
> index 47dcb08..88cbcd1 100644
> --- a/src/PVE/API2/LXC.pm
> +++ b/src/PVE/API2/LXC.pm
> @@ -645,6 +645,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 => {
> @@ -707,6 +721,14 @@ __PACKAGE__->register_method ({
>  		       '-timeout', $timeout, '-authpath', $authpath,
>  		       '-perm', 'VM.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