So I have 2 machines with OpenSUSE VM’s on them via qemu/kvm. 1 is a Debian 11 host, the other is an EndeavourOS host. Both have 2 OpenSUSE VM’s, OpenSUSE LEAP 15.4, and OpenSUSE Tumbleweed. On both, the LEAP VM’s work for shared clipboard. On both, the Tumbleweed VM’s don’t. I’ve verified the spice-vdagent package is installed, to my knowledge that’s all that should be required. Is there other spice packages that it actually needs to work or something? Thanks for any guidance!
I’ve been fighting with this all day, with the same results. My last attempt was to use the spice-vdagentd.service file from LEAP on TW; no change at all. IMHO, this is a security-related issue, although I’ll be darned if I know what setting to edit. I had similar problems with VMware and their open-vm-tools.
What makes no sense is why the services aren’t giving more details about what is/is not happening. On the working systems, I’ll get a message about the clipboard parameters being setup; on TW I’m getting nothing. Maybe there’s a way to increase the logging.
OK, I’ve made some progress. Running
spice-vdagent -x -d
works; tested auto-resizing and clipboard. I will have to check my LEAP system to see why this process is being started for users, but not on TW.
Well, the problem seems to be that the user service spice-vdagent.service is not starting when the spice-vdagentd.socket is listening. Running
systemctl --user start spice-vdagent.service
starts without fail; why this fails at login is still a mystery.
At least we have a workaround.
spice-vdagent.service is user service, spice-vdagentd.socket is system socket, they are not related to each other (OK, they are related in the sense that user vdagent contacts system socket which triggers start of system service spice-vdagentd.service).
Running
systemctl --user start spice-vdagent.service
starts without fail; why this fails at login is still a mystery.
spice-vdagent.service is not active here as well and vdagent is running and clipboard sharing works just fine. Are you sure vdagent is not running? Have you checked whether process (not service) exists?
vdagent is supposed to be started by /etc/xdg/autostart/spice-vdagent.desktop, there is really no integration of user service into user session startup as far as I can tell.
This is interesting. On LEAP, the required services run exactly as you point out, but on TW it has created a user service:
$ systemctl --user status spice-vdagent.service○ spice-vdagent.service - Spice guest session agent
Loaded: loaded (/home/ajgringo619/.config/systemd/user/spice-vdagent.service; static)
Active: inactive (dead)
Since /etc/xdg/autostart/spice-vdagent.desktop exists, could these 2 be in conflict?
I tried to edit my last post, but it didn’t show up. Disregard my last comments about the user service; that was a failed attempt of mine. What I did try - and failed - was to add a delay to the spice-vdagent.desktop. When run manually with dex, the agent runs as expected.
FWIW, this exact same problem has crept up on my EndeavourOS VM, so I’m convinced this is a KDE issue, not an openSUSE issue.
Finally found a solution!
-
Copy
/etc/xdg/autostart/spice-vdagent.desktop
to~/.config/autostart/
-
In
/etc/xdg/autostart/spice-vdagent.desktop
, comment outX-GNOME-Autostart-Phase=WindowManager
-
Reboot and test
This works on every modern KDE build I’ve tried it on, not just openSUSE.