Copy&Paste does not work on VNC
Host environment
- Operating system: Ubuntu 20.04
- OS/kernel version: 5.4.0-91-generic
- Architecture: x86 64-bit
- QEMU flavor: qemu-system-x86_64
- QEMU version: 6.2.92
- QEMU command line:
.bin/bin/qemu-system-x86_64 ubuntu-desktop.qcow2 -m 2G -smp 2 -enable-kvm -vnc :0 -chardev qemu-vdagent,id=ch1,name=vdagent,clipboard=on -device virtio-serial-pci -device virtserialport,chardev=ch1,id=ch1,name=com.redhat.spice.0
Emulated/Virtualized environment
- Operating system: Ubuntu 20.04
- OS/kernel version: 5.11.0-41-generic
- Architecture: x86 64 bit
Description of problem
Cannot copy&paste between host and guest when vnc is used (gtk works fine).
Steps to reproduce
- Build qemu 6.2-rc2 using the following
./configureoptions:
--prefix=$HOME/.bin --target-list=x86_64-softmmu --enable-kvm --enable-vnc --enable-gtk --enable-vte --enable-xkbcommon --enable-sdl --enable-spice --enable-spice-protocol --enable-virglrenderer --enable-opengl --enable-guest-agent --enable-avx2 --enable-hax --enable-system --enable-linux-user --enable-libssh --enable-linux-aio --enable-linux-io-uring --enable-modules --enable-fuse --enable-fuse-lseek
- Run the above qemu command using vnc server. Connect to the VM desktop using
vncviewer :5900where vncviewer is downloaded from here. - Try to copy and paste something in the terminal between host and guest. It doesn't work.
Additional information
I'm following this article which says copy&paste is supported on vnc.