Python Screen Virtual Machine

In a virtual box, the screen resolution can be anything - even something strange, like 993x451, etc. I tried changing it using pywin32, but I could not:

>>> dm = win32api.EnumDisplaySettings(None, 0)
>>> dm.PelsHeight = 451
>>> dm.PelsWidth = 950
>>> win32api.ChangeDisplaySettings(dm, 0)
-2L

which ends:

DISP_CHANGE_BADMODE

any help?

+3
source share
3 answers

The way I found this is to enable automatic resizing of the client from the guest OS. Then, in the host OS, programmatically resize the VM window. This will change the resolution.

0
source

Have you configured the virtual machine to actually advertise this mode in the OS?

edit: VirtualBox , . (. ), . VESA VESA. , , , . ( smdline, , ) , YMMV.

, : VBoxManage controlvm

, : VBoxManage setextradata global GUI/MaxGuestResolution xres, yres

+1

VirtualBox ? .

0

Source: https://habr.com/ru/post/1716363/


All Articles