Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running an Ubuntu 12.04 VirtualBox guest (with Guest Additions installed) within a Windows 7 host.

How can I set the resolution of the guest VB to match the physical machine's native resolution (1280 x 800)? IOW, is there a way to add 1280 x 800 to the available options?

The highest resolution available under the System Settings > Displays that "fits" within the native one is 1024 x 768, which gives an aspect ratio of 4:3, whereas the native resolution gives an aspect ratio of 8:5 (better known as 16:10, for some reason). Choosing this resolution means that a considerable portion of the screen is left unused (which is a big deal when working with a tiny screen to begin with). All the other resolution choices available through System Settings > Displays give a 4:3 aspect ratio. (E.g. there's also a 1280 x 960 option, which does use the full width of the screen, but results in the loss of the bottom 160-pixel-high strip of the image.)

share|improve this question

OK, it looks like I solved this problem, somehow or other. Here's what I did:

  1. I quit VirtualBox (both the vm and the graphical VirtualBox Manager window);
  2. At the Windows host's cmd prompt, I ran:

    C:\>cd "c:\Program Files\Oracle\VirtualBox"
    C:\Program Files\Oracle\VirtualBox>VboxManage setextradata "<vmname>" "CustomVideoMode1" "1280x800x16"

    (Of course, replace <vmname> with the actual name of your vm, and replace the resolution spec string with the appropriate one for your monitor. Also note that the last character in the argument CustomVideoMode1 is the digit 1, and not the letter "l". With some fonts the two characters are practically indistinguishable. BTW, more custom models can be specified, using a similar command, with arguments of the form CustomVideoMode2, CustomVideoMode3, and so on up to, I believe, CustomVideoMode16.)
  3. I restarted VirtualBox and the VM; (at this point I noted that there was no change in the appearance of the display, nor in the resolution options available through System Settings > Displays);
  4. I selected System Settings > Additional Drivers, selected the option Oracle VM VirtualBox Guest Additions for Linux Module, and clicked on Activate;
  5. I restarted the vm;
  6. I wiped the tears of joy from my eyes.

When the VM came back up, the resolution was the correct one; furthermore, now the resolution options available through System Settings > Displays include one additional option "1280 x 800 (16:10)" (it is, of course, the currently active one).

I can't tell whether running VBoxManage setextradata ... (steps 1 & 2 above) made any difference. IOW, steps 4 & 5 may very well have done the trick.

Also, note that the Oracle VM VirtualBox Guest Additions for Linux Module was not activated even though I had previously run Devices > Install Guest Additions... at the VirtualBox control panel.

share|improve this answer
I was having the exact same issue with my 1920x1080 screen. I can confirm that you do NOT need to employ steps 1 & 2. Merely installing VirtualBox Guest Additions, restarting, and then making sure Guest Additions is active is enough to get the correct native resolution. The resolution is of course slightly modified depending on whether you are using scaled mode, fullscreen, or seamless. – user190738 Sep 6 '13 at 23:07
Step 4. was what fixed it for me. I didn't do 1, 2 or 3. But in ubuntu's System Settings/Additional Drivers, the VirtualBox Guest Addition showed up, but not activated. Activating and restarting ubuntu fixed things, and I now have Auto-resize of the ubuntu screen working correctly, both in windows mode and in full screen mode. – user226295 Dec 17 '13 at 11:30

protected by Community Dec 27 '13 at 18:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.