Cant get copy paste working with spice ?

Anfernee12345

New Member
Aug 18, 2022
21
0
1
Hello.

I have installed a Antix linux Base version VM onto poxmox server. installed Spice to to desktop pc and virt-viewer to linux part.
I have watched many tutorials how it should work, but in my case, copy/paste just isnt working.

can anyone help me out, how and what should be done from start to finish ?
Ask any information needed.
 
In the VM you need to install spice-vdagent too.
its allready installed.
Anything else ?

When i open the SPICE prefenrences on the windows machine, it shows me Share clipord as active and checked.
Other 2 options share folder and read-only are grayed out and disabled, cant even select them.

Is there something else i need todo on windows part except installing spice ?
 
Last edited:
Antix linux isnt a systemd linux and its really lightweight also. maybe there are thing not installed that are needed for this to work. Any help would be welcomed.

On antix linux its says Transafer error The agent is not connected when i try to drag a file in it. out from it doesnt work at all. text copy/paste also doesnt work at all.

On Linux lite i can vopy fily onto desktop it works. But doesnt wok other way. And regular text copy paste doesnt work at all.

Any ides anyone :)
 
Last edited:
I would create an Ubuntu VM and test if it's working just to exclude all other possible factors.
 
I would create an Ubuntu VM and test if it's working just to exclude all other possible factors.
hello, just tried it out, Yes, it work s with ubuntu flawlessy :)
But how can we get it to work with Antix ? Is it possible at all ?

Copy/paste for text works both way
Copy paste for files only works from pc to guest
 
Last edited:
hello, just tried it out, Yes, it work s with ubuntu flawlessy :)
But how can we get it to work with Antix ? Is it possible at all ?

Copy/paste for text works both way
Copy paste for files only works from pc to guest
i figured it out :)
spice-vdagent to startup and all works with copy and paste. :)
 
Hi, I have proxmox 7.2-7 installed in two different machines, one at home and the other at work. I use virt-viwer with SPICE to add sound at the output on the VM. I have no issues with the SPICE connection until yesterday.
I have both machines updated, but yesterday I spice connection was not established through virt-viewer at home and today at work, using the same VM Arcolinux installation on both machines. The connection is not established.
Today, reading this post I installed spice-vdagent on the VM and after reboot the problem still persist. I use Archolinux in both pc at home and at work to connect to the proxmox Server.
I can access to the VM through the noVNC connection but the sound is missing.
I wonder whether I have to downgrade virt-viewer on Arcolinux or there is another related problem.


I will very appreciate some help, regards
 
Hi, yesterday I recieved an update of libgovirt (1:0.3.9-1 -> 2:0.3.8-1), which is required by virt-viewer and the problem was solved.

Hope this help, regards
 
I've just installed tampermonkey for chrome

following there's script copied from reddit (won't work on firefox) (adjust @match to your needs):

JavaScript:
// ==UserScript==
// @name         noVNC Paste for Proxmox
// @namespace    http://tampermonkey.net/
// @version      0.2a
// @description  Pastes text into a noVNC window (for use with Proxmox specifically)
// @author       Chester Enright
// @match        https://*
// @include      /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant        none
// ==/UserScript==
const delay = 1
;(function () {
    'use strict'
    window.sendString = function(text) {

        var el = document.getElementById("canvas-id")
        text.split("").forEach(x=>{
            setTimeout(()=>{
                 var needs_shift = x.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/)
                 let evt
                 if (needs_shift) {

                     evt = new KeyboardEvent("keydown", {keyCode: 16})
                     el.dispatchEvent(evt)
                     evt = new KeyboardEvent("keydown", {key: x, shiftKey: true})
                     el.dispatchEvent(evt)
                     evt = new KeyboardEvent("keyup", {keyCode: 16})
                     el.dispatchEvent(evt)

                 }else{
                     evt = new KeyboardEvent("keydown", {key: x})
                }
                el.dispatchEvent(evt)
            }, delay)
        })

    }


    $(document).ready(function() {
        setTimeout(()=>{
            console.log("Starting up noVNC Copy/Paste (for Proxmox)")

            $("canvas").attr("id", "canvas-id")

            $("canvas").on("mousedown", (e)=>{
                if(e.button == 2){ // Right Click
                    navigator.clipboard.readText().then(text =>{
                        window.sendString(text)
                    })
                }
            })
        }, 1000);
    })


})()
 
Last edited:
  • Like
Reactions: Tmanok and LnxBil
You guys could also enable xterm.js support on your guests, as opposed to using noVNC. That would alow to copy-paste very easily.
  1. add serial port to guest
  2. reboot guest
  3. follow this article
1709002489920.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!