-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No symbol characters when automating actions in QEMU/KVM VMs. #269
Comments
Is it possible to try with an en_US locale? I don't think we've really solved the capitalization issue, just put in enough work-arounds that it mostly works. I've always suspected locale as being the culprit but never had a good repo. |
I don't know how often I have answered such questions in the past, but the VNC / RFB protocol is not ideal for being used with virtual machines. Daniel P. Berrangé is one of the QEMU core developers and has several related blog posts on this issue; read them if you're interested in the gory details. The summary is this:
|
Many thanks for your detailed response @pmhahn and @sibson. It's a lot to digest. The discussion around it could be simplified to just vncdotool. If I use Can I easily troubleshoot how vncdotool converts from the user-supplied input to the virtual key-presses? Using the -v -v -v option, I can see it saying it's sending a '@', but from your explanation, it's actually sending raw key presses? I understand that I could write a parser that tokenises each character of input I wish to send, then sets the appropriate In the end, I've decided that I probably can't use this tool to do what I want to achieve (automatic configuration of a machine), as there are probably too many failure scenarios to account for (Window positions etc). Feel free to close the ticket. It would be awesome if the content of your comment above was included in the main docs for the project. Cheers, |
For an
Just this week I observed a similar issue with a very old version of Qemu 2.6 from ~2016; I just opened #270 which includes a patch to improve logging the key-codes sent; feel free to give my branch a try. |
Thanks @pmhahn for the great explanation. I suspect VM is one of the more common use cases these days, and it would make sense to implement the QEMU extension. Not sure what that means for other VMs, but anything that improves things so it just works for most people is a good thing. |
Please include the following information:
vncdotool version: vncdotool==1.2.0
VNC server and version: QEMU VNC Server, version 6.2+dfsg-2ubuntu6.12 (ubuntu 22.04)
Steps to reproduce
kvm -cdrom ~/Downloads/debian-12.1.0-amd64-netinst.iso -m 2048 -net nic -net user -vnc 127.0.0.1:2,password=off
vncdo -v -v -v -s localhost:2 type 'THISISaVncdotoolTest1234!@#$'
Expected result
I'd expect to see the following text on the shell
Which erroneous result did you get instead
Additional information
This is my locale, do you think it could be somehow involved?
I'm aware of the 'shift-' operations, but I was hoping not to have to write my own parser for every character sent. Looking through the issue history for this project, it seems the capitalisation issues were solved years ago, so I figure it's an issue with QEMU in particular? Have you got an suggestions on how I can fix?
Entering the same characters in a vnc viewer works fine.
Many thanks!
The text was updated successfully, but these errors were encountered: