8

Is there any way to get Compiz'z fancy graphics to work in a VirtualBox VM.

...and would it be too slow via a virtual video-card?...

Is it possible to actually hook into the Host's own physical video card? .. or maybe use a second dedicated physical video card?

UPDATE
JanC's method works fine for me.
I had already installed virtualbox-guest-addition ... (I'm using Lucid)
To uninstall this VirutalBox Addon pack, run its installer with uninstall added to the end of the command line. (the other packages JanC mentioned seems to replace its functionality)... In my case the command was:

sudo VBoxLinuxAdditions-x86.run uninstall
Peter.O
  • 24,681
  • 1
    "virtualbox-guest-additions" is an .iso image with guest tools for different OS'es, but this package isn't entirely open source, and the 3 packages I named are specifically built to work well with Ubuntu (e.g. by hooking into DKMS, the drivers get automatically recompiled on kernel upgrades). the VirtualBox Addon pack (or whatever it's called) might still be useful when running a non-Ubuntu guest (if it doesn't have it's own packages for these tools). – JanC Nov 01 '10 at 05:10

2 Answers2

10

In the VM configuration, go to the "Display" section, in the "Video" tab make sure "Enable 3D acceleration" is checked.

After installing Ubuntu inside the VM and starting it for the first time, install the 3 packages that start with virtualbox-ose-guest- inside the VM, then reboot Ubuntu inside the VM. (BTW: you don't want the package named virtualbox-guest-additions.)

If I do that, I can run Compiz without problems (Unity doesn't work though!).

JanC
  • 19,422
  • Great, thanks.. This may be the "wow" factor to woo a friend over from Windows. He has had the VM running for a couple of days, but was disappointed that the fancy graphics wern't available... He is only prepared to test Ubuntu in a VM.... (so was I initially).. . – Peter.O Oct 31 '10 at 02:50
  • There might be issues with some Compiz effects, but I think the default effects are pretty safe (I ran it with wobbly windows &c. enabled). – JanC Oct 31 '10 at 03:02
  • I've set 3D in VirutalBox, and re-installed the VM... but "CompizConfig Settings Manager" is not showing up in the Main Menu... and ccsm is not found via the Terminal... Any ideas? (is it because I have an Ubuntu host (maybe)? – Peter.O Oct 31 '10 at 04:10
  • ccsm is not installed by default, but you should be able to enable compiz in in the Appearances dialog. – JanC Oct 31 '10 at 05:45
  • Oh, I forgot something sorry, will add that to my answer... – JanC Oct 31 '10 at 05:46
  • @JanC: I enabled the "Visual Effects" tab of the Appearance Preferences dialog, and I can now select "Normal" and "Extra"... but there was still no sign of "CompizConfig Settings Manager" in the Main Menu... I had to sudo apt-get install simple-ccsm before I got a Main Menu item... It is working now... Thanks. – Peter.O Oct 31 '10 at 18:06
  • Like I said, it's not installed by default, but you don't need it to run compiz, only if you want more configuration options than the 2 presets "Normal" and "Extra". – JanC Oct 31 '10 at 20:36
0

If you got 11.10+, I think you should move to VMware because Unity and Compiz works 100% there. Make sure you enable 'Accelerate 3D graphics' from Display settings in the VM.