Page 1 of 1

[SOLVED!] How to set default screen size

Posted: 5. Mar 2021, 21:44
by rsail
I am running windows 10 pro as the host and creating a linux mint guest. I have two monitors. Is there a way to set the default screen sizes on each monitor when I start up?

Re: How to set default screen size

Posted: 6. Mar 2021, 12:22
by mpack
The guest OS chooses the display size, not the monitor (i.e. not VirtualBox). Usually the guest will choose whatever size was used last.

If yours is constantly reverting to some unwanted default then have you actually installed the OS? Obviously a live CD variant of the OS will always use defaults.

unable to set default resolution

Posted: 9. Mar 2021, 20:57
by rsail
I have a two monitor setup on a windows 10 host. My vb guest is linux mint 20.1. I am running vb 6.1.18 with guest additions installed. I added these two lines to the bottom of .profile on the guest:

xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual1 1920x1080_60.00

When I startup the guest I can see the monitor size change to 1920x1080 but then it reverts back to 800x600. You can see this on the bottom of the log file. How can I get the first monitor to default to 1920x1080? I thought this specific problem was suppose to be fixed in the current vb release.

here's a link to my vb log file:

https://termbin.com/mxwr

Re: How to set default screen size

Posted: 9. Mar 2021, 22:43
by rsail
I believe you are incorrect. Virtualbox seems to be setting the startup resolution, hence the hint

Re: How to set default screen size

Posted: 9. Mar 2021, 23:38
by scottgus1
I merged your other topic about the settings inside the VM, since the subject is all the same. Please post your zipped log here.

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log and the hardening log next to it, zip them, and post the zip file, using the forum's Upload Attachment tab.

Re: How to set default screen size

Posted: 10. Mar 2021, 19:45
by rsail
was finally able to solve this with help from the linux forum:
fth0 wrote:
Use the following command to add the missing line to the "Mint 20 VM.vbox" file:
CODE: SELECT ALL

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
Then start the VM, change the display resolution, and shut down the Linux guest OS. Afterwards, the resolution will probably be remembered. You can verify this with (note the get/set difference ;)):
CODE: SELECT ALL

VBoxManage getextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
Doing as they suggested and setting "GUI/LastGuestSizeHint" solved the problem and now the virtual Mint retains 1440x900 across reboots. Just thought I'd share the fix here in case anybody finds this thread and goes, "Yeah - I'm having that problem too!"
although when I did this I had to edit the vbox file directly. Be sure to change "Mint 20 VM" to the name of your *.vbox file

Re: [SOLVED!] How to set default screen size

Posted: 10. Mar 2021, 20:17
by scottgus1
Glad you found a solution!

My thought was that the Guest Additions weren't installed, and the log would show if they were or not.

Thanks for letting us know what worked for you!