如何通过noVNC调整QEMU VNC会话大小及相关技术咨询
Great question! Let's break this down into two key areas to help you out:
Will QEMU Support the 'ExtendedDesktopSize' Encoding in the Future?
As of now, QEMU's built-in VNC server does not support the ExtendedDesktopSize encoding required for noVNC's SetDesktopSize message to work seamlessly.
There's no public, concrete timeline for when this feature might be added. The best ways to track potential support are:
- Keep an eye on QEMU's official development discussions (via the
qemu-devel@nongnu.orgmailing list) — new feature proposals and work-in-progress updates are shared here. - Check QEMU's release notes for each new version, as feature additions are documented there.
- If this functionality is critical for your use case, you can submit a formal feature request via QEMU's bug tracker to raise visibility with the development team.
Alternative Methods to Resize QEMU VNC Sessions
If you need to adjust your QEMU VNC session size right now, these workarounds are reliable:
1. Set a Fixed Resolution at QEMU Startup
Define the virtual display resolution when launching QEMU using the -video parameter. For example, to set a 1920x1080 resolution with a virtio VGA card:
qemu-system-x86_64 -video virtio-vga,width=1920,height=1080 -vnc :0
This will initialize the VNC session with your desired resolution from the start.
2. Adjust Resolution Within the Guest OS
Most modern guest operating systems (Linux, Windows, etc.) let you modify the display resolution directly through their system settings. As long as you have the proper virtual graphics drivers installed (like virtio-vga drivers), changing the resolution in the guest will automatically update the VNC session's output size.
3. Use QEMU Monitor to Dynamically Resize
You can adjust the resolution on-the-fly using QEMU's monitor interface:
- Launch QEMU with monitor access (e.g., add
-monitor stdioto your command, or use a telnet port like-monitor telnet:127.0.0.1:5555,server,nowait). - Once in the monitor, send the appropriate command for your virtual graphics card. For virtio-vga, this would be:
change virtio-vga resolution 1920x1080
Replace the resolution values with your preferred dimensions, and the VNC session will update immediately.
内容的提问来源于stack exchange,提问作者Ritchie Liu

