[pve-devel] [PATCH qemu-sever v11 2/6] add clipboard variable to return at status/current

Markus Frank m.frank at proxmox.com
Fri Sep 8 12:46:45 CEST 2023


By that noVNC is able to check if clipboard is active.

Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
 PVE/API2/Qemu.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 8a2fdef..49d0420 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2697,6 +2697,13 @@ __PACKAGE__->register_method({
 		type => 'boolean',
 		optional => 1,
 	    },
+	    clipboard => {
+		description => 'Enable a specific clipboard. If not set, depending on'
+		    .' the display type the SPICE one will be added.',
+		type => 'string',
+		enum => ['vnc'],
+		optional => 1,
+	    },
 	},
     },
     code => sub {
@@ -2715,6 +2722,7 @@ __PACKAGE__->register_method({
 	    my $spice = defined($vga->{type}) && $vga->{type} =~ /^virtio/;
 	    $spice ||= PVE::QemuServer::vga_conf_has_spice($conf->{vga});
 	    $status->{spice} = 1 if $spice;
+	    $status->{clipboard} = $vga->{clipboard};
 	}
 	$status->{agent} = 1 if PVE::QemuServer::get_qga_key($conf, 'enabled');
 
-- 
2.39.2






More information about the pve-devel mailing list