dockur / macos

OSX (macOS) inside a Docker container.
MIT License
127 stars 11 forks source link

[Feature]: Change screen resolution #23

Open seitenca opened 3 weeks ago

seitenca commented 3 weeks ago

Is your proposal related to a problem?

Its not possible to change the resolution.

Describe the solution you'd like.

Solution 1: Generate the OpenCore boot drive on demand. We might also need to generate new OVMF variables, as mentioned here. They mention that the macOS VM's resolution can be changed easily via the "Settings -> Displays" option, but in my case, it is not possible or I have not figured it out yet.

Solution 2: Add 3 or 4 resolution options (1080p, 720p, 4K, etc.) to the image.

Describe alternatives you've considered.

I have tried to generate the OpenCore boot drive as mentioned here but have failed to do so. I'm also now looking on how to generate new OVMF variables.

Additional context

No response

kroese commented 3 weeks ago

One advantage of generating the OpenCore boot drive would be that it would allow us to skip that "picker" screen after boot.

After 15 seconds it selects EFI now, and it results in a black screen (I dont know why). Therefore you can never go AFK during the installation or when starting the container. Also because it needs keyboard input from the cursor-keys, you cannot use the container on a mobile phone like Android, because its keyboard does not have those keys.

So by generating the boot drive on demand, it would not only fix the resolution problem, but also this annoying startup-menu.

kroese commented 3 weeks ago

I've added support now for a custom config.plist file. It fixed that EFI entry, maybe it also fixes your resolution issue?

kroese commented 2 weeks ago

The OpenCore boot image is now generated during the build of the container, and I was able to disable the bootmenu now. So this annoying picker is finally gone.

seitenca commented 2 weeks ago

The OpenCore boot image is now generated during the build of the container, and I was able to disable the bootmenu now. So this annoying picker is finally gone.

I've added support now for a custom config.plist file. It fixed that EFI entry, maybe it also fixes your resolution issue?

Hi @kroese, yes now the resolution is 1080p, but is possible to change it? The opencore screen skip works very well 😵

kroese commented 2 weeks ago

Yes I think it needs to be changed in the config.plist file. But currently we generate this image not during every boot, but only once while building the Dockerfile.

So the solution would be to re-generate the OpenCore image dynamicly every time the container starts. (Or optimally only when the user changed the BOOT_MODE value, and skipped otherwise).

But I really doubt it is worth the effort. Resolutions greater than 1080p will be much too slow to render via VNC or without GPU acceleration. And resolutions much lower than 1080p are not really interesting for most people. So for me personally I think its no problem to keep it fixed at 1080p. Do you have any special reason for wanting to change it?

GeekWorkCode commented 2 weeks ago

Yes I think it needs to be changed in the config.plist file. But currently we generate this image not during every boot, but only once while building the Dockerfile.

So the solution would be to re-generate the OpenCore image dynamicly every time the container starts. (Or optimally only when the user changed the BOOT_MODE value, and skipped otherwise).

But I really doubt it is worth the effort. Resolutions greater than 1080p will be much too slow to render via VNC or without GPU acceleration. And resolutions much lower than 1080p are not really interesting for most people. So for me personally I think its no problem to keep it fixed at 1080p. Do you have any special reason for wanting to change it?

I want to use macOS for CI/CD-related purposes (sign into Xcode, Transporter),The machine configuration is not high, and the resolution needs to be lowered. I'm only interested in using the command line