Bug#862870: [Pkg-libvirt-maintainers] Bug#862870: virt-viewer: doesn't seem to support XSendEvent

Christophe Fergeau cfergeau at redhat.com
Tue Aug 1 15:52:51 UTC 2017


On Tue, Aug 01, 2017 at 12:34:59PM -0300, Guido Günther wrote:
> [ cc'ing the gtk+ maintainers ]
> 
> Hi,
> On Fri, May 19, 2017 at 01:44:41PM +0200, Guido Günther wrote:
> > On Wed, May 17, 2017 at 11:40:22PM +0200, Cyril Brulebois wrote:
> > > Package: virt-viewer
> > > Version: 1.0-1
> > > Severity: important
> > > 
> > > [ x-d-cc: debian-boot at lists.debian.org ]
> > > 
> > > Hi,
> > > 
> > > Trying to use xdotool (either on the command line or through its xdo
> > > python bindings) fails when sending key events to a specific virt-viewer
> > > window. In this case, XSendEvent is used instead of XTEST, which doesn't
> > > seem to be supported by virt-viewer, and anything sent this way is
> > > ignored.
> > 
> > Is there a simple one liner to test this?
> 
> It seems this is not working for any gtk+3 application. While xterm
> works as described in the xdotool manpage a simple:
> 
>     zenity --entry --title xsendeventtest &
>     xdotool type  --window $(xdotool search "xsendeventtest") asdf
> 
> does not work here either. Maybe the gtk+ maintainers have and idea how
> to get this working?
> 
> > > It's possible to raise the virt-viewer window and then send key events
> > > without specifying a target window, which is implemented using XTEST in
> > > xdotool, but that means messing up with the focus in the surrounding
> > > window environment, which is highly impractical.
> > > 
> > > I've also tried switching from default spice to vnc, still no luck. No
> > > changes when I tried 5.0-1 from a sid chroot.
> > > 
> > > Any help/suggestion welcome, it prevents me from automating d-i tests
> > > with libvirt. (While they do run fine with a “bare” kvm.)
> 
> Can you point me to the code you run the tests with? You should be able
> to use the same mechanism with libvirt as without it.
> Cheers,

Have you considered using virsh send-key to inject the key presses
inside the guest?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20170801/12fa1a41/attachment-0001.sig>


More information about the pkg-gnome-maintainers mailing list