How do I pass more keystrokes to the guest via VNC?
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I pass more keystrokes to the guest via VNC?
I'm experimenting running various guests in KVM on a Fedora host using tightvnc to view the guest desktop. But a lot of keystrokes I would like to pass to the guests are consumed by the host's window manager.
Of course, I could go through the window manager's control application and tell it to not use each key combination I want to pass, but then I couldn't use it on the host.
It sure would be nice if I could press a modifier key that would cause the next key combination to be passed to the host application with the focus (VNC). Does anyone know of any such mechanism, or any other solution?
That's not the kind of solution I'm looking for, because it would require executing a command in a shell outside the VNC window instead of operating directly in the VNC window.
However, it's an interesting lesser-preferable possibility. But I can't use it because virsh seems to require a domain-id, which I don't have.
The VM you have running seems to not have been started using libvirt. You're probably using qemu-kvm directly to run it, and this is why libvirt cannot keep track of it.
What you need to do is create a VM definition for this VM using virsh/virt-manager/virt-install, and then start it using virsh or virt-manager.
When the VM is operated this way, it will appear in the virsh list output
libvirt is one of those things I've been meaning to investigate to see if it's worth the effort to use. And apparently this capability to pass key combination could be one convenience it offers.
But how does it do it? Wouldn't it be simpler to just do whatever it does to pass the combination? I know a monitor port can be used to send commands to qemu-kvm. That's another thing I've been meaning to look into. I'm guessing that's the mechanism libvirt uses to pass the key combination.
My experience is that software packages (and government entities) that try to take control and do things for you often get in the way and make it awkward to do some things. I'm suspicious libvirt is one of those.
libvirt is the de-facto standard for managing kvm VM instances. You can do everything libvirt does through qemu-kvm command line, but it's not scale-able - you have no means of maintaining consistent VM definitions, consistent APIs to perform tasks, and have to do absolutely everything manually.
Not to mention all the tools around libvirt, like guestfish and virt-v2v, and all the higher end management platforms. If you stick to a single VM and never are going to go any higher, it doesn't matter much, but if this is a growing setup and not just something to play with, you definitely need a management framework.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.