[virt-tools-list] Configuring virt-manager to grab the mouse

Martin Kletzander mkletzan at redhat.com
Wed Aug 27 09:17:07 UTC 2014


On Fri, Aug 22, 2014 at 09:26:50AM -0400, Digimer wrote:
>Hi all,
>
>   On some client installs, like say RHEL/CentOS 5, virt-manager grabs
>the mouse. That is, the user can't move the mouse outside of the VM's
>window until they press ctrl+alt. On other installs, like say Windows
>8/2012, the mouse doesn't get grabbed, though with corner-bumping being
>a thing, it would be really nice if it did.
>

At first, I have to apologize I can't help you with that (probably),
but anyway, I'll try.  Grabbing the mouse is a thing that was done
because that helped clients send over keyboard shortcuts that would
otherwise be done on the machine with the client connected.  However,
it was a thing nobody wanted (it prevents screensaver to be ran, etc.)
and there are ways how to get rid of the grabbing.  I'm not sure which
settings do that, mainly because it depends on the graphics viewer
used (GtkVNC/spice-gtk), but I know about few things that *may* help.

In the domain XML [1], there are many options that *should* change the
behaviour and I'm afraid that you'll have to go through trial and
error for most of them.

Here's what I remember (search in formatdomain[1] for descriptions):

 - <mouse mode='client|server'/> inside <graphics type="spice">.

 - <input type='tablet'/> for absolute movement.

 - <video model="qxl"/> and appropriate drivers.

Having installed/configured spice-vdagent and/or qemu-guest-agent
*should* not have any impact on that, but you may try if all else
fails.

It may also depend on various other features, but I cannot possibly
cover them all.  I've never heard about anywone who *wants* the mouse
to be grabbed.  That is until now.  Anyway forced grab should be
possible in the code, I'm not sure whether it is in the GUI.

>   How can I edit a VM's XML definition or use virsh to manually control
>this behaviour? In the above examples, I would actually like to reverse
>the behaviour, as there is (for me) no benefit to grabbing in old OSes
>that don't even use a GUI (ie: in CentOS 5 we use a minimal install). So
>knowing how to manually enable/disable this behaviour would be very
>helpful! :)
>

I can only help with advise to remove all the things that helped get
rid of the grabs.  That is removing any possible tablet devices from
the guest, trying to change between VNC/SPICE, changing mouse mode
between client/server, etc.

Again, sorry I don't have the help, hopefully someone else will step
in and give you the rest of the info.

The proper suggestion, though, would be asking on spice-devel list or
using spice/vnc as a keyword when searching for more answers as this
does not really depend on the client (virt-manager/virt-viewer) used.

Martin

[1] http://libvirt.org/formatdomain.html

>Thanks!
>
>--
>Digimer
>Papers and Projects: https://alteeve.ca/w/
>What if the cure for cancer is trapped in the mind of a person without
>access to education?
>
>_______________________________________________
>virt-tools-list mailing list
>virt-tools-list at redhat.com
>https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140827/d11807d6/attachment.sig>


More information about the virt-tools-list mailing list