VirtualBox screen size

If you are into virtualization with Sun xVM VirtualBox, there’s a great new simple solution to setting the guest virtual machine’s screen size/ resolution - since the release of VirtualBox version 1.6.2.

It’s a new VBoxManage command, explained in the Help Contents/ User Manual at section 9.12 under the heading “Configuring the maximum resolution of guests when using the graphical frontend”.

As the default screen resolution option was unsatisfactory for me, I found by trial and error that the perfect resolution for a Guest on my Host’s desktop (with a 19 inch LCD) is 1272 x 920. So in my HOST system, I shut down VirtualBox, then opened a terminal and typed:

VBoxManage setextradata global GUI/MaxGuestResolution 1272,920

This worked perfectly. Now when I run any guest machine in Virtualbox, the guest immediately opens to my desired screen size (1272x920) and it works consistently time after time. You can set any screen size you want this way. Absolutely no adjustments are required inside the guest machine’s settings.

Thanks, great tip. Now don’t issue this command as root, you’ll
lock yourself out of VB. If that’s happened just issue the
following command as root:

rm -r /tmp/.vbox-user-ipc/

where user is your username, after that VB will start as normal.

If you have problems getting usb to work in 1.6.2 on 11.0RC1,
I’ve found this to work:

put this line in your /etc/fstab

usbfs /proc/bus/usb usbfs devmode=0664,devgid=1000 0 0

and comment out the existing usbfs line.

This won’t automount usbfs so you’ll have to mount it in a
terminal, as root just type

mount usbfs

Now it may happen that you have already run VB one or more
times in your session, if that’s the case just run this
command again, but now you don’t need to be root:

rm -r /tmp/.vbox-user-ipc/

Now usb will hopefully work.

Oh that is a good tip! I’m still running 1.6.0 and having to boot into each VM and fiddle with the the resolutions after installation of the guest was a huge pain.

Thanks for passing that on.

thanks I was wondering how do that

Good tip, indeed.
But I wonder why you need to fiddle with the resolutions in the guest. With Guest Additions I just resize the window if needed.

Resizing the physical window doesn’t change the screen resolution inside it (for me anyway). I’ve almost universally had to modify the X configs by adding a mode line. Unless or until I do that my resolutions are always set to 1900x something on my Dell D520. Screen on my guests always extend way off the screen in either direction.

It’s an easy fix to be sure, but annoying none the less.