Wednesday, May 4, 2011

Enable Desktop Cube in Unity, all Ubuntus

Enabling Desktop Cube in Natty under Unity is known to break Unity. It might require some spare time, effort and patience to restore Unity if it breaks. Only proceed if you feel confident enough!

All the Compiz plugins are inter-dependent and even more tightly bound due to the 'Ubuntu Unity Plugin'. There was a bug addressed that made the 'Ubuntu Unity Plugin' depend on the 'Desktop Wall' plugin. They later made it only depend on the 'large desktop' feature but still, most users break Unity while trying to enable the Cube.

Precise 12.04

Enabling Desktop Cube in Ubuntu Precise is just a matter of few clicks, just like you used to do it in the old Gnome 2.x. For more information, please take a look at 'Enable the Desktop Cube' section here:

Oneiric 11.10

Preliminary note for Oneiric users: We've already learned that in Oneiric, enabling the Cube doesn't necessarily set off the POOOFF!-effect, as known from Natty, disabling a lot of Compiz plugins. But it definitely still does disable the 'Ubuntu Unity Plugin'! The below instructions were written for Natty, but you can also use them for Oneiric, basically for making sure that none of the essential plugins, besides the 'Ubuntu Unity Plugin', has been disabled in the process of enabling the Cube.

Update; please see the section 'Enable Desktop Cube' here:

Instructions written for Natty 11.04

Here is what I did step-by-step to enable the Cube.

Install CompizConfig Settings Manager, CCSM, if not already installed, by either searching Software Center or by running this command:

sudo apt-get install compizconfig-settings-manager

Once installed, press the <Super> (Windows logo button) to bring up the Dash, type 'compiz', and then click the 'CompizConfig Settings Manager' icon.

Backup Default Settings

It would be a good idea to backup Unity's default settings for disaster management. Go to 'Preferences' in the left pane. Under 'Profile' click 'Export' and save the settings. Name it something like 'Unity-default' or 'Unity-wall' for the sake of convenience later. You can easily import back these settings if something goes wrong.

Now you need to disable and enable a few plugins step-by-step.

Compiz will reload every few seconds after you disable or enable a plugin. Please wait at least 5-10 sec between every plugin both when disabling and enabling those.

Disable Plugins
  1. Ubuntu Unity Plugin
  2. Desktop Wall
  3. OpenGL (Choose 'Disable these plugins' when it asks it would disable some other plugins too.)
  4. Composite
Enable Plugins
  1. Composite
  2. OpenGL
  3. Desktop Cube
  4. Rotate Cube
  5. Animations
  6. Enhanced Zoom Desktop
  7. Expo
  8. Fading Windows
  9. Ubuntu Unity Plugin
Once all the above mentioned plugins have been enabled, make sure that any of the following plugins didn't get disabled accidentally or your windows won't have title bars/borders, you cannot move them, resize them, etc.:
  • Window Decoration
  • Move Window
  • Resize Window
  • Place Windows
  • Scale
Enabling the 'Ubuntu Unity Plugin' would result in some conflicts. Choose 'Resolve Conflicts' in the first dialog window.

The first conflict arises between 'Reveal Mode' from 'Ubuntu Unity Plugin' and 'Rotate Flip Left' from 'Rotate Cube'. I recommend to 'Disable Rotate Flip Left' here as we don't want to disturb Unity. However, it has been reported that you can keep both if desired.

The next conflict is between 'Ubuntu Unity Plugin' and 'Gnome Compatibility Plugin'. I recommend 'Disable Show Main Menu' here.

And there is yet another one. Choose 'Disable Run Dialog' here.

Restart GDM

If everything goes well, you've successfully set up the Cube by now. Press Ctrl + Alt + F1 to go to the tty1 screen and log in using your credentials. Now run this command:

sudo service gdm restart

So, you will now see your Unity desktop with Cube enabled.

Adjust Number of Desktops

Once more, fire up CCSM and go to 'General Options' near the top of the page. Click the 'Desktop Size' tab and adjust 'Horizontal Virtual Size' to 4 and 'Vertical Virtual Size' to 1 for a perfect cube. Surely, you can adjust the number of desktops as per your needs and likes.

Now you are free to modify the settings for your favorite plugins like 'Animations', 'Cube Reflection & Deformation' etc. As far as there are no conflicts, you can play with CCSM.

It would be a good idea to backup your Cube configuration now so you can easily restore it if something goes wrong.

Pre-configured Configuration File

You can simply download the file at the link below and import it as explained in the first section of this post and, hopefully, you will get the Cube. You'll need to log out and back in for the changes to take effect.

Unity Broken?

If you are facing trouble, first try restoring your default Compiz settings from the backup we've created at the start, then restart GDM or, if possible, just relogin.

If that doesn't solve the issue, please follow the 'Unity Reset' section here:

Related Posts:

Compiz , Natty Narwhal , Troubleshooting , Unity