VMware Communities
volabos
Contributor
Contributor

Ubuntu Guest on MacOS host fails to occupy entire screen

Hi,

I have installed Ubuntu-22 guest OS on my MacOS Monterey machine. When I start the guest, following window appears (please refer to the snapshot Start desktop.png)

As you can see, it is not occupying the full screen. There are black strips along the left and right edges.

The resolution of my Ubuntu is set as 1920 X 1052, which is the closest to my MacOS resolution that is 1920 X 1080. Please refer to the Resolution.png attached

Therefore I manually need to hit Resize Virtual machine to fit option from View manu (please refer to Resize.png attached) to make it occupy entire window. This I need to do every-time I start the Ubuntu.

Is there any way to make it automated every-time I run VM, instead of having it manually? I have VMware Tools installed already.

Many thanks for your support.

 

 

Reply
0 Kudos
6 Replies
Technogeezer
Immortal
Immortal

Have you tried running the VM in Full Screen mode? If you have tools installed it should change your resolution to fill the entire screen. And if I recall, this setting will persist across boots of the VM.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
Reply
0 Kudos
volabos
Contributor
Contributor

Hi, Thanks for your reply. But I do not want to make VM full-screen, as in that case typical command+tab does not carry me to the desired VM rather to a window that display list of VMs, unless I repeat command+tab again. This is not desired to me either.

Therefore I want to have maximised window for VM, but in that my screen is not fully occupied as I have reported here.

Tags (1)
Reply
0 Kudos
Technogeezer
Immortal
Immortal

The behavior seems to happen because the custom resolution you've set by expanding the VM doesn't match any of the available "standard" resolutions known to the guest. It won't persist like you want it. 

One workaround seems to be documented here: https://www.tecmint.com/set-display-screen-resolution-in-ubuntu/ I've checked this out and it consistently returns the window size to the "larger" size across logins and across reboots of the VM.. But this works only if using xorg/X11 and not Wayland (Wayland is the default for Ubuntu nowadays).. You'd have to turn off Wayland by editing /etc/gdm3/custom.conf and uncommenting the line that disables the use of Wayland.

Still, I'd consider using full screen mode. As you want to set it up, the maximized window will not really be maximized. The VM's window will still have a title bar at the top of it, and the macOS menu bar will still be there. Running in full screen mode gives you that extra space back. And you need to do nothing in the VM to maintain the larger size - the VM will switch to the full screen mode and resize itself to the full resolution of the screen when you power it up and log in.

From from a usability standpoint. you will not run into the behavior of the macOS dock intruding on your Ubuntu VM when you move the mouse pointer to the bottom of the screen. You also can get to the Fusion menu bar by moving the mouse to the top of the window - it'll reappear and hide again after you use it. 

The only thing you lose is drag-and-drop to the host. But if you're trying to cover the screen with the VM, you aren't going to be able to do that anyway because the desktop and finder windows won't be visible. 

I understand what you want to do with navigation between the VM and other macOS applications, You can use command-tab when the VM is in full screen mode to return to other macOS applications. But to return to the VM you can use the keyboard shortcuts control-left arrow or control-right arrow to switch between macOS "virtual consoles" or spaces - one of which the full screen Linux will reside in. Alternatively to return to the VM, right click on the Fusion icon in the Dock, and select the virtual machine's open window.

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
volabos
Contributor
Contributor

Thanks for control-left arrow or control-right arrow suggestion. I am just wondering if there is any way to pragmatically resize the window to fit the screen, as I do by clicking it from View menu item?

Reply
0 Kudos
wila
Immortal
Immortal

Hi,


@volabos wrote:

Thanks for control-left arrow or control-right arrow suggestion. I am just wondering if there is any way to pragmatically resize the window to fit the screen, as I do by clicking it from View menu item?


It used to be possible to use automator to do these kind of things.
I have NO idea if that's still possible, but if it still exists then the following post might help to get you started,

https://communities.vmware.com/t5/VMware-Fusion-Discussions/How-to-close-virtual-machine-window-auto...

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
Technogeezer
Immortal
Immortal

I've been playing around a bit on this. There doesn't appear to be an AppleScript directory available with Fusion any more, so that avenue is out.

Here's also something to try (I'd forgotten about this macOS behavior). It's maybe not a programatic solution, but it's on par with the View -> Resize Virtual Machine you're asking for considering the number of keystrokes/mouse clicks.

After logging into the virtual machine (which will be a smaller window due to the Linux boot loader and text console resizing the screen to a smaller value), hover the mouse pointer over the green button in the VM window's macOS title bar. One of the options will be "Enter Full Screen". Now hold down the option key on the keyboard, and that option changes to "Zoom". Click that and you get the old macOS behavior of the window expanding to fill the screen below the menu bar. The VM resolution will automatically resize to the new window size.

Your alt-tab will work just like it did when you manually resized the window.

(Once you've done this a couple of times, simply option-clicking the button makes the process faster).

Option-click again on the green button while it's zoomed, and the window returns to its pre-"Zoom"ed size..

I was able to record an Automator workflow that not only invoked Fusion, but started the VM and then logged into the account for you. Within the workflow I was able to resize the VM screen using the option-click of the green button in the window title bar. But the workflow stored my account password in clear text. Given the relative ease on how the Zoom button worked, using Automator was a nice educational exercise. Storing passwords in clear text in a script was a non-starter for me even if it was for a VM login. 

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
Reply
0 Kudos