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

Markus Frank m.frank at proxmox.com
Tue Nov 14 10:22:52 CET 2023


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

Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>
Tested-by: Dominik Csapak <d.csapak at proxmox.com>
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 0177489..2bca07f 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2699,6 +2699,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 {
@@ -2717,6 +2724,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