New tool: virt-click, send simulated mouse clicks to a VNC server

This new virt tool called “virt-click” lets you send simulated mouse clicks to a VNC server.

$ virt-click --vnc localhost:0 click 200 200 right

The motivation for this tool comes from this posting.

I tested it against QEMU’s internal VNC server, so you can use it on virtual machines already. It probably works on any VNC server, but I have not tested it.

Eventually the plan is to extend this to SPICE, and also allow it to connect transparently to libvirt guests, but that work is not done yet. Also it would be good to add other features, eg:

  • key presses
  • screendumps (like gvnccapture and snappy)
  • better handling of VNC authentication


Filed under Uncategorized

2 responses to “New tool: virt-click, send simulated mouse clicks to a VNC server

  1. Automatically sending input events to a VM can have weird results, because it can be hard to predict dialog states or positions etc.. Do you have an idea how to solve that, or just hope for the best? I have been told there are tools to help you record scripts that can wait on various events, such as waiting for a window with a specific title etc.. Perhaps we should expose these kind of window manager events, so we can make such scripts for any kind of guests OS. (note: we will get a lot of window informations when seamless windows gets implemented in spice)

    • rich

      I think currently people need to use their common sense. Sending clicks to guests will only work in some narrowly controlled situations. However I like the idea of having generalized events for controlling window managers. We already have ACPI events for handling power off, and this could probably be extended for other situations.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.