Ubuntu Natty in Virtualbox with Unity
I have found myself explaining multiple times over the past few weeks how to get Ubuntu Natty with Unity working in Virtualbox virtual machines, there seems to be a common misconception that it doesn’t work (it does) and a common perception that it is not obvious how to do it (perfectly valid). So this is how. Firstly install a fairly new version of Oracle VirtualBox on your host operating system (I am using Ubuntu 10.10, I expect others including Windows would also work). The open source edition of Virtualbox might also work, but I am using the Oracle edition, not the OSE edition from the repositories.
Set up a new virtual machine, give it say a gig of ram and 32MB video ram (works with less, but that seems comfy) and check the box in the display properties to use 3d acceleration. Now install Ubuntu Natty as you would normally, it will tell you that you don’t have the hardware to run 3d Unity, which is fine – you don’t have the right graphics drivers yet.
At this point you might be tempted to try and install the Virtualbox guest additions using the menu option on the host. Do not do this. That way lies pain, confusion, and no working graphics.
Instead, the right way to do it is to log in to the guest operating system and install the virtualbox-ose-guest-x11 package. Do not be tempted by virtualbox-guest-additions that is the wrong thing (it is the CD image that a host injects into a guest, no point installing that in a guest). Do not worry about installing a package with -ose – in the name inside a non-ose host, it doesn’t matter.
Once you have done that, restart your guest and you should boot into a shiny new Ubuntu Natty with Unity, if you got it right it should look something like the screenshot below with the sidebar. You can also see the onboard keyboard with brown keys that is going to be shipped as part of the shiny new Natty desktop, plus a version that I spent a few hours theming to make it look like it kind of belongs in the new branding. Would be nice to get the letters in the centre of the keycaps, if anyone wants to help with that give me a shout in the comments.