2

The shared clipboard doesn't work for me. How to fix it?

Host (Debian buster) with:

  • standard system utilities
  • ufw (ufw enabled, deny incoming, allow out going, deny routed)
  • apparmor-profiles, apparmor-profiles-extra
  • stterm
  • xserver-xorg-core, xserver-xorg-input-libinput, xinit
  • xserver-xorg-video-intel
  • jwm
  • virt-manager
  • /var, /tmp, /var/lib/dpkg, /home are mounted with nodev, noexec, nosuid
  • xclip, x11-apps

I add my vm user (non-root) to the libvirt group.

Guest (Debian buster) with:

  • standard system utilities
  • ufw (ufw enabled, deny incoming, allow out going, deny routed)
  • apparmor-profiles, apparmor-profiles-extra
  • xserver-xorg-core, xserver-xorg-input-libinput, xinit
  • xserver-xorg-video-qxl
  • jwm
  • spice-vdagent
  • xclip, x11-apps

With virt-manager of the host, I set the video to 'qxl' and the display spice to 'spice server'. That is the instruction in section "Enabling SPICE using virt-manager" at https://www.linux-kvm.org/page/SPICE

The "Display Spice" hardware in the "Show virtual hardware details" have the following settings:

Spice Server
------------
type: Spice server
Listen type: Address
Address: Localhost only
Port: [x] Auto (Port:5900)
TLS port: [x] Auto

Since restarting the vm would magically make the "network" hardware disappear, I created another "network" hardware with the gui.


Somehow, within the guest the spice-vdagent doesn't automatically start. I set it to start automatically, following QEMU/KVM SPICE - copy & paste functionalities work on the Windows VM, but not on the Debian VM

But shared clipboard still doesn't work.


In the gui, the "Channel spice" hardware says "State: disconnected". How to connect the channel?

Duh Huh
  • 49
  • 1
  • 7

2 Answers2

1
  • service spice-vdagent start with the root user in the guest.
  • After starting X (with startx command), run spice-vdagent in a x-terminal-emulator with a non-root user in the guest.

Within virt-manager gui, the "Channel spice" and "Channel qemu-ga" still say "State:disconnected". But shared clipboard works.

Using ufw is fine.

Duh Huh
  • 49
  • 1
  • 7
0

The answer is in /usr/share/doc/spice-vdagent/README.md

You need to have spice-vdagentd running and a spice-vdagent per X11 session. Currently, clipboard share relies on X11 clipboard so you may need workarounds for Wayland.

td211
  • 131
  • 5