Getting a larger virtual monitor with a Mac hosted VirtualBox and Ubuntu guest

Ubuntu with 1024x768 screen in VirtualBox
Now that's a respectable 1024x764 Ubuntu view in VirtualBox on my MacBook.

I use VirtualBox on my Mac for “other” operating systems.

I was recently creating a new Ubuntu guest OS for doing some work with PostgreSQL on Linux. I like a GUI, so I was using pgAdmin. Normally I don’t care if the window is 800×600, but when I started using pgAdmin, I couldn’t see all of the window.

pgAdmin at 800x600

I first tried the System->Preferences->Monitors in the Ubuntu guest. But that was a dead end.

default 800x600 max resolution

Then I tried finding something in VirtualBox that would allow me to increase the virtual monitor size. I found out that there is a VirtualBox Guest Additions image within the VirtualBox installation. It’s called VBoxGuestAdditions.iso. I could see it listed in File->Virtual Media Manager->CD/DVD Images.

Adding VirtualBox Guest Additions through VirtualBox

But I couldn’t view it as a CD-ROM within Ubuntu. When I clicked the CD-ROM icon on the bottom of the guest OS window, it wasn’t listed. Also, I couldn’t navigate to the .iso.

VirtualBox Guest Additions not showing up

All I had to do was mount it as a CD-ROM for the guest OS and then install it. I know where it is, it’s in the VirtualBox application folder.

Except… on Mac, the contents of an Application folder aren’t navigable by default. It’s treated as a monolith for file/folder purposes. To get around this, I just navigated to my home directory (~) and created a quick soft link to the folder containing the VBoxGuestAdditions.iso.

$ cd ~
$ ln -s /Applications/ VBoxAddons

Now I could navigate to the .iso by clicking the CD-ROM on the bottom of the VirtualBox guest OS window, and choosing Choose a virtual CD/DVD disk file…. Then I just navigated to my home directory and clicked the soft link folder to view it’s contents.

soft linked folder to VirtualBox application contents

Inside I selected the VBGuestAdditions.iso.

select VBGuestAdditions.iso

Now I can select the VBGuestAdditions.iso from the CD-ROM menu on the bottom of the VirtualBox guest OS window.

select VBGuestAdditions.iso as a CD-ROM

For me, this mounted as /media/VBOXADDITIONS_4.0.4_70112

All I had to do was run

$ sudo /media/VBOXADDITIONS_4.0.4_70112/

When that finished I restarted Ubuntu.

Now I’ve got a nice big 1024×768 Ubuntu window.

Ubuntu with 1024x768 screen in VirtualBox

More information

Author: Eric Holsinger

Eric Holsinger is a software professional and photography enthusiast in Southern Maine.

Leave a Reply