How-to Run Unity in VirtualBox

Ubuntu’s Unity desktop environment requires 3D acceleration to run. If you don’t have a compatible graphics card or don’t have the drivers installed, Unity will fall back to the classic interface. Fortunately the free VirtualBox virtual machine software is capable of providing the necessary 3D acceleration to a virtual Ubuntu desktop, provided of course that the host system has it.

  1. You’ll need the latest version of VirtualBox. Unless you’re already using Ubuntu 11.04, the version in the repositories is too old. You can download the latest version for a variety of platforms from the VirtualBox website.

  2. Install Ubuntu in VirtualBox normally. Unity will fall back to the classic desktop.

  3. In the settings for your virtual machine, under Display->Video select Enable 3D Acceleration and bump the video memory up to 32 MB.

  4. Inside the virtual machine, install the package virtualbox-ose-guest-x11 using Synaptic or the terminal:

    sudo apt-get install virtualbox-ose-guest-x11
  5. Reboot the virtual machine and you should be able to log into Unity.

Unity runs completely smooth in my virtual machine and I haven’t noticed any graphical glitches.

If the panel and applications appear gray and unthemed, gnome-settings-daemon is crashing. You can work around this bug by restarting it:

killall gnome-settings-daemon
gnome-settings-daemon &

Update: Ubuntu 11.10 will detect that it’s running in VirtualBox and offer to install the guest additions driver automatically. You don’t even need to reboot the virtual machine after installing it; just return to the login screen and make sure the Unity environment is selected before you log in again. Impressive!

Archived Comments

brian t

Or you could install the “unity-2d” packages and select “Unity 2D” at login?


Thanks, this worked perfectly!



I’ve always liked this blog but updates only come around an ubuntu release. I know it’s hard blogging but can you start it up again more consistently?

You’re extremely knowledgable and write tutorials that are easy to follow.

I’m not asking for 20 fluff articles a day :) Once a week or even twice a month would be great!

Cheers and best of luck!



thanks, works like a charm


Thanks for the article. Been using VirtualBox for some time now, best free virtualization software!


Just upgraded to 11.10, and updated guest additions. on the machine config I have 3D acceleration with 32 mb selected. I log in, and when I launch an app it’s not appearing, but when I view the desktops, I can see the apps are there. In Unity 2D all is well. I have the latest version of virtualbox as well, running on os x lion.

any ideas?


I have the EXACT same problem. Note when I disable 3d acceleration and fire up the VM, I can use unity (3d) as well as unity 2d with no problem. Once I have 3d acceleration checked, I can’t use unity (3d). I’m running OS X Lion (10.7.2).


+1 for this issue. Running OSX 10.6.8. Unity is unusable with 3D Acceleration. The windows won’t appear.


Same problem here.. Host OS X Lion, 3d acceleration on -> problem as krmilligan describes


Same on 10.6.8 - 3D on under VBox = no rendering as described before.


Any tips on the OS X problem? I see the same thing. I would use Ubuntu+Unity without 3d acceleration if I could, but changes to the Unity plugin in compizconfig-settings-manager don’t work when 3d acceleration is disabled.

To be clear:

1. WITHOUT 3d acceleration, if I start compizconfig-settings-manager and change, for example, the size of the dock icons to the minimum, the dock icons don’t actually change. Nothing I do in CCSM has any effect.

2. WITH 3d acceleration, the CCSM settings do actually work, but no windows appear.


Respond via email