2

I'm using qemu regularly and I find myself in the need to toggle or switch "Zoom to fit" on and off. From the menu bar, under the option "View" we got all kinds of options, like "full screen", "Zoom in" and "Zoom out. And among these options is the option "Zoom to fit"

Most of these options have written down keyboard shortcuts, but not the one I need or hoped for.

Next I wanted to find a command line argument for qemu to maybe switch this "zoom to fit" option on, before I even start my virtual machine. But also this is lacking from all documentation I can find on qemu.

So basicly my question is: Is there a shortcut, command line option to toggle "zoom to fit" on or off? Or should I ask the developers or try myself to "enhance" qemu?

3
  • 1
    from superuser.com/a/1770245/1282809: -display gtk,zoom-to-fit=on
    – xyz
    Commented May 11, 2023 at 10:45
  • That could be an answer if you want? the comment with the code link also seem very helpful and I thank you for linking me to this. would vote. Its also possible for me to answer my own question but I think its fair to let you?
    – CodeAsm
    Commented May 12, 2023 at 20:43
  • 1
    Somehow when I post my answer, it will automatically post as comment instead. I'm fine if you answer your own question. I think this is the reason: superuser.com/help/deleted-answers
    – xyz
    Commented May 13, 2023 at 23:16

1 Answer 1

0

Per answer by @xyz we found

qemu -display gtk,zoom-to-fit=on

Would do the trick. The official (inline?) documentation says:

@zoom-to-fit: Zoom guest display to fit into the host window. When turned off the host window will be resized instead. In case the display device can notify the guest on window resizes (virtio-gpu) this will default to "on", assuming the guest will resize the display to match the window size then. Otherwise it defaults to "off". Since 3.1

A secondary question I got, SDL, was answered by SDL itself, it scales on its own.

default no vga or -vga std works fine

original source of this answer, adapter to my particular case: QEMU startup zoom automation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .