KVM: How to make mouse/clipboard seamless between host and guest?

Hi,

I have just installed a Windows 7 guest in KVM.

Then I noticed I need to press CTRL+ALT+L each time I need to release the mouse back to the host.

After some searching I found this recommended solution:

http://serverfault.com/a/457611

and installed spice-vdagent through YaST.

Then in the VM manager I opened the properties for the guest like this:

https://snag.gy/qmLWhE.jpg

https://snag.gy/5FNIsL.jpg

Then I tried to run the guest but the mouse is still not seamless, i.e. needs manual unlocking.

So I went to YaST and checked services: spice-vdagentd was enabled but not active. So I clicked Start and then OK and got this message:

https://snag.gy/J3hKrC.jpg

And… I am stuck as I don’t know what it means and what to do.

Can anyone help with this please? I need to make seamless mouse/clipboard between host and guest.

It could be permissions problem or missing directory. Try pre-creating /var/run/spice-vdagentd (settings permissions/owner as necessary). If it works then, you need to open bug report.

Ok, I did that and I was able to start the service:

ll spice-vdagentd/

total 4
srw-rw-rw- 1 root root 0 Jun 6 15:28 spice-vdagent-sock
-rw-r–r-- 1 root root 5 Jun 6 15:28 spice-vdagentd.pid

However mouse and clipboard are still not seamless.

Is there anything else I need to set?

The recommendation in the openSUSE community docs which is the same as the top answer in your reference is to configure a virtual tablet instead of a virtual mouse and in the case of openSUSE also install the touchscreen packages.

Personally, I haven’t fully investigated the consequences of this setting, from a Developer’s point of view touch gestures while appearing on the surface are similar to mouse movements and clicks, are very different.

For example, “Touch and hold” normally should be the equivalent to a Rt-click, but when developing an application the code is very different. I don’t know if <all> normal applications would automatically translate these different actions.

But yes, I can see how a display emulating touch would “activate” differently and possibly automatically when “touched” instead of locking the mouse focus.

TSU

@TSU

That has been there since creating the guest but that doesn’t help.

https://snag.gy/25bPE9.jpg

Besides that setting,

Did you also install the tabletpc pattern?

zypper in patterns-openSUSE-tabletpc

You’ll need to at least log out and back in to the Guest (maybe even a reboot).

TSU

Re-reading the title of your post,
These steps to configure your Guest as a tabletpc to enable “touch” gestures replacing click mouse events only addresses the mouse, it won’t do anything for sharing clipboard contents.

AFAIK libvirt should support a common clipboard between Host and Guest by default already, if it’s broken then you may want to mount a shared folder and paste content to a common storage.

I describe how to set this up with this article
https://en.opensuse.org/User:Tsu2/virtfs#Overview

TSU

@TSU

Thank you but I think I would rather need help with the SPICE way because I need both mouse and clipboard seamless.

Plus I already have a real tablet device (Wacom) and I am not quite sure how correct it is to try a trick like tabletpc etc.

Can you help with spice?

Forget it! I found the right way :slight_smile:

I went to http://www.spice-space.org/download.html

and installed on the guest Windows QXL driver and spice-guest-tools

Everything works!