[Note: I’m using VirtualBox 2.0.4]
If you’re using VirtualBox it would be very useful if you installed Guest Additions which are available for both Windows and Linux guest OSs. The advantages of installing Guest Additions include the availability of arbitrary screen resolutions and not having to press the right-Ctrl button every time you want to move your mouse pointer out of the guest OS window.
To install Guest Additions, first turn on your guest VM. Once you see your Ubuntu desktop, press the right-Ctrl button and then go the Devices menu. From there, click on Install Guest Additions.
Now you will see a CR-ROM icon appear on your desktop with the name “VBoxAdditions…”. Open a new Terminal window (Applications -> Accessories -> Terminal) and execute the following commands:
[Note: in the first command that’s a zero at the end of ‘cdrom’, not the letter ‘o’]
The installation will now begin. Once the installation ends restart your virtual machine.
After the restart you will notice that you are able to move your mouse pointer freely in and out of the guest OS window. Also you would notice that when you go to System -> Preferences -> Screen Resolution, you will have a few more resolution options (before installing Guest Additions you would have only 2).
Most importantly after you install Guest Additions, when you resize your guest OS window it will automatically change resolution and fit the window. When you maximize the window, the guest OS will take up the whole screen – and when you check System -> Preferences -> Screen Resolution, you will see that there are even more resolution options available than before.