VirtualBox‘s guest additions provide better display drivers, mouse pointer integration, seamless windows, and more. If you’re doing much work in a virtual machine you should have them installed.
I wrote this guide with VirtualBox 2.0.2, and tested both Ubuntu 8.04 and 8.10 alpha 6. (As of VirtualBox 2.0.2, Ubuntu 8.10 guests will now work.)
Start up your Ubuntu guest. In VirtualBox, click Devices->Install Guest Additions and the guest OS should recognize a new CD. Open a terminal and run this command:
The installer should work for a minute, and then prompt you to restart the virtual machine.
Older versions of VirtualBox had trouble, but VirtualBox 2 has fixed the setup issues with Ubuntu 8.04 guests. The screen resolution will be adjusted on-the-fly as you resize the VirtualBox window. Mouse pointer integration will be on by default. You’re done!
Mouse pointer integration works, but both pointers are still drawn on the screen. The larger problem is that the new display driver does not work. For some reason Ubuntu isn’t using it. Turn it on manually in your xorg.conf file.
sudo gedit /etc/X11/xorg.conf
Find the device section, which should look like this:
Section "Device" Identifier "Configured Video Device" EndSection
And add the driver line like this:
Section "Device" Identifier "Configured Video Device" Driver "vboxvideo" EndSection
Log out for the change to take effect. Auto-resizing should work perfectly now, and the mouse cursor issue is also fixed. However, there seems to be a bug where the bottom GNOME panel moves to the top when the screen is resized.