Sunday, May 25, 2008

Gnome + Compiz + Virtualbox Seamless Window + Workaround = Awesome

I have been a long time user of Linux, with various desktops and servers throughout the years (technically both Linux and Windows), and currently I have been using Ubuntu 8.04 with VMWare Workstation 6.5 Beta.  A while back I tried out VirtualBox, now owned by Sun, and I was disappointed with the featureset and speed versus VMWare.  However times have changed, and VirtualBox 1.6 is way faster, and I am definately impressed, even with it's Seamless Desktop functionality.

 

Before it gets mentioned, I swapped out the vmware-vmx executable from the debug executable to the release executable to try to gain speed benefits, and of course my virtual machine was tweaked (Windows Server 2003) with the tools installed.

 

There has only been one issue, which was with compiz enabled, caused a nasty drawing bug with Seamless Windows when there was no windows open on the desktop.

 

Until a proper workaround is provided, I created this small .NET application that will force an open window into the upper left hand corner of the screen, with 1x1 pixel visible on the desktop, which seems to satisfy the seamless desktop functionality and allows things to function normally.  The window does not provide any kind of functionality, and is not available through the taskbar, in order to kill it off you must kill the process through task manager.

 

It was almost simple to convert my VM from VMWare to Virtualbox also.  I uninstalled the VMWare Tools, as this can cause conficts once the Virtual Machine is running under VirtualBox.  I used a registry hack called MergeIDE to ease the kernel loaders ability to load the OS from a different type of disk interface (my VMWare machine had SCSI, VirtualBox has IDE), and also I swapped the HAL in my virtual machine from Multiprocessor ACPI to the generic ACPI HAL (not uniprocessor ACPI, instead the generic ACPI hal which has the acronym for ACPI spelled out).  Since VirtualBox reads VMDK files (VMWare's disk file format), it booted right up, installed the VirtualBox Guest Additions, and was noticeably faster, with only losing support for the DirectX 9 compatibility supported by VMWare Workstation 6.5.  This is not a comparison of VMWare Workstation 6.5, the same speed differences are noticeable with VMWare Workstation 6 and VMWare Server.

 

You can get the full source and binaries of debug and release mode for the compiz and seamless desktop workaround here.  I simply dropped the executable into the startup folder for "All Users", under the start menu, and the issue disappears.

8 comments:

Daniel said...

thats great!

eglen said...

Nice, thanks for making the .NET app. I was looking around for something to do exactly that.

FergatROn said...

That is awesome, thanks so much. I tried looking for a solution and never found one. You're my virtual-hero (as manly as I can make a statement like that).

captain said...

Thanks for this! Simple solution, seems like something small like this could be integrated into the Guest Additions for the time being.

Cesar said...

I have this very problem and I got really excited when I saw there was a solution (I'd rather have virtualbox in seamless mode than have special effects, so I have them turned off right now).

The link you provide to the workaround doesn't work (error 404). I would really (really) appreciate if anyone could re-upload it or somtehing...

Thank you!

Greg said...

I found a copy linked to from the bug report at https://bugs.launchpad.net/ubuntu/+source/virtualbox-ose/+bug/230811

Greg

FergatROn said...

I'm acting as a mirror for this beautiful app, just in case something went wrong. I'm hosting it on my site.

http://www.fergytech.com/wp-content/uploads/vboxworkaroundtar.gz

http://www.fergytech.com/2008/10/31/virtualbox-seamless-mode-workaround-w-compiz/

Alessandro said...

thank you very much. It has been really helpful, i was thinking to start programming something like hat by myself!! thank you!