Score:0

Copy and paste from a QEMU VM with VNC graphics?

ky flag

I run a headless server that uses qemu + kvm to run a few VMs, and I manage them with virsh + xml file definitions. Because this a remote / headless system, I set the graphics as VNC, and then with ssh port forwarding, I can use TightVNC / RealVNC to view the desktop of the VM. However, copy and paste to and from the VMs (mostly want to paste to a VM) does not work.

I've tried looking around for a solution but I haven't found one with VNC as the graphics option. Is this possible to get working?

Thank you for any advice.

norbjd avatar
tr flag
Hello, just had the same question. Did you manage to make the copy-paste work?
djdomi avatar
za flag
Requests for product, service, or learning material recommendations are off-topic because they attract low quality, opinionated and spam answers, and the answers become obsolete quickly. Instead, describe the business problem you are working on, the research you have done, and the steps taken so far to solve it. However if this is Linux meaned it exists xrdp whixh works with the. ms remote desktop client. Most vnc clients also support c&p
Jason avatar
ky flag
Thank you for the comment. The server uses the VNC protocol for the display and not Microsoft's protocol. I have tried different clients and none of them have working copy and paste with QEMU's VM graphics. I have used these clients with no problem on other computers running standard VNC servers, my questions specifically regards QEMU / the guest VM settings to enable copy and paste.
Score:0
vi flag

This is not currently possible because the VNC server built into Qemu needs to convert the clipboard contents to keystrokes, and emulate pressing them on the machine.

You can ask someone to add this functionality here: https://github.com/qemu/qemu/blob/master/ui/vnc.c

Qemu already has a sendkey command, so the functionality you need to add is similar to this: https://gist.github.com/mvidner/8939289

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.