Posted by: reformedmusings | May 5, 2011

Howto: Get the Compiz Desktop Cube in Ubuntu 11.04 Natty and Unity

NOTE: Post updated with corrected Compiz desktop settings. Although the previous setting worked for the cube, it caused issues with AWN’s Shiny Switcher and other desktop switchers. The 4/1/1 arrangement works for everything that I’ve tried.

I’ve posted on my not-so-great experience with Ubuntu 11.04 Natty and Unity here, here, and here. In the latter, I achieved a useful level of function when I augmented Unity with Avant Window Navigator (AWN). AWN gave me back my hardware temperature monitors and an application menu system. However, I still didn’t have a good workplace switcher but did have a good number of crash bugs to which I added a few newly discovered ones today.

The Compiz Cube may seem like eye candy, but I have weaved it tightly into my daily productivity. The Unity Workplace Switcher is basically the Compiz Viewport Switcher, which requires some rounds of the screen with your mouse pointer to change workspaces. The cube requires very little hand movement and no keyboard use when set up optimally.

I thought, because Unity told me, that Unity depended on Compiz’ Desktop Wall. That is, until I stumbled on this launchpad bug report where others like myself pushed hard to get the cube back. It turns out that Unity doesn’t really depend on the Desktop Wall, but on “largedesktop” which both the Cube and Wall provide. In a wonderful response to user requests, the Unity developers changed the explicit dependence in Unity from the Wall to largedesktop. Although they still don’t officially support the Desktop Cube in Unity, power users now have the flexibility.

After discovering this, I immediately opened the Compiz Configuration Settings Manager (ccsm) and enabled the Desktop Cube. As I expected, Compiz protested that the Desktop Wall conflicted with the Cube and asked if I wanted to disable it. I said yes. Compiz then protested that Unity depended on largedesktop in the Wall and asked if I really wanted to disable the Wall. Again I said yes.

Holy screen tsunami, Batman! Unity and Natty crashed in a huge way, rendering the desktop useless! If I didn’t have AWN running in the corner, I have a feeling that would have been all she wrote. Providentially, I was able to work through the system menu in AWN to get the desktop back and proceed on to a fully operational cube.

After thinking about the firestorm, I came up with a sequence of Compiz setting changes that will provide you the cube with very little pain. So, here’s how I recommend proceeding based on my experience.

First, use Update Manager to bring your Natty system totally up to date. Then change the desktop settings in ccsm -> General Settings as shown (NOTE: This has changed from the original post!):

Note that I changed the settings from the Unity default of 2/2/1 to 4/1/1. If you don’t change the settings, you’ll get a plane instead of a cube. This change shouldn’t crash Natty.

Next download any dock program that has menu and logout/shutdown widgets. I like AWN, but you could use Docky, Cairo, whatever, as long as you have a menu widget and logout/shutdown either as part of the menu widget or separate. Place it at the bottom of the screen so that none of the Unity panels lay over it. This is your life line. I have AWN with only the sensor, places, and main menu applets. Actually, places and main menu are the same applet, and main menu provides access to logout/shutdown.

Now, go into ccsm and deselect Unity and Desktop Wall.  Your Unity panels will disappear, but don’t worry because you have your other dock with the main menu applet if anything goes wrong. More than likely, this will also clear all of your Compiz settings. So first, under General at the top of ccsm, select Composite, Gnome Capability, and OpenGL. Next select Desktop Cube and Viewport Switcher (if it isn’t already selected), and I also selected Rotate Cube, 3D Windows, and Cube Reflection and Deformation. Ensure that Composite, Gnome Compatibility, OpenGL, and Window Decoration remain selected. That should to it.

I recommend doing the following in the order presented. Select the Ubuntu Unity Plugin and then Unity MT Grab Handles all the way at the bottom and and Regex Matching under Utility. When you select Unity, you will be asked about Reveal Mode which conflicts with Rotate Cube. Enable Reveal Mode anyway. I was also asked about the key to put keyboard-focus on launcher. Again I chose to set it anyway. Same for setting the key to execute a command.

Also select JPEG, Png, and Svg under Image Loading, Compiz Library Toolbox, Bailer, and Workarounds under Utility. Select Move Window, Resize Window, and Static Application Switcher as a minimum under Window Management. Here are all the screens showing the settings that I use, starting at the top of ccsm:

Now logout and log back in – and you’ll do so repeatedly if you want to customize Compiz and the cube from here. Lots of Compiz changes cause Unity to crash, losing the top panel and leaving screen relics behind.

This should work for you without any problems other than what I listed. However, if you get total garbage on the screen and can’t find your way back, open a terminal window from the main menu applet on your safety dock. Type the following line:

unity –replace

That will restart Unity. You won’t have a clean screen, but you should get the core functions back, including the top panel and most of the launcher. Technically you can also reload Unity the same way using Alt-F2, but when Unity crashes it takes that function with it. If that fails, simply log out and log back in.

When you’re all done, you can uninstall the “safety” dock if you so desire.

I tried this process on my test system and it worked exactly as I just described it. I now have perfectly working Desktop Cubes on both Ubuntu 11.04 Natty systems with Unity. Cool (AWN is hiding):

If anyone knows how to get a decent screenshot of a cube in Natty, let me know. I tried both Gnome Screenshot and Shutter, but both produced relics like you see above time after time.



  1. I’ve been following your adventures with Natty. I’m amazed you got the desktop cube to work. Thankfully, my old system won’t allow too many bells and whistles, so I haven’t had to worry about it. 😦

    • Getting the cube wasn’t easy the way that I did it. I can’t adequately describe the screen crash-storm that simply clicking on Desktop Cube created. Besides crashing Natty, it totally wiped out my Compiz settings. The process that I tested and presented above worked pretty well. I’m very happy that the devs fixed Unity’s dependencies to permit the cube. It makes me more productive.

      So, are you using the 2D Unity? If so, how’s it working out?

  2. Actually, I am using 3D Unity. One of the games I play, Shisen, crashes quite often. I don’t know whether it just takes up too much CPU. My system feels sluggish, like it doesn’t have the power to handle Unity – yet it didn’t cause me to have to run Classic.

    • If you’re running 3D, you should be able to get the cube. It might be slow, though.

      Have you checked the system logs about the game? Or, perhaps the easier route is to execute it from a terminal window. Any error messages will appear in the terminal right up to its closing out.

  3. Thank you for the suggestion. 🙂

  4. […] answer lay in the changes I made to Compiz’ desktop setup to enable the cube. I had set it in Compiz Configuration Settings Manager (ccsm) to 4 horizontal, 1 vertical, and 4 […]

  5. […] So, this provides minimal functionality. I’m still working on workspace switching with just mouse buttons and small movement. No joy on that yet. My initial attempts caused Unity to crash every time I used the Compiz Configuration Settings Manager. Please comment here if you have achieved success in this quest. [Solved: see this post.] […]

    • Expo with bottomright screen edge

      • Thanks for offering a solution. I eventually used edge flipping when the mouse touched the left/right side of the screen, but that was a lot of pointer movement. The cube rotation provided a much more elegant solution with no pointer movement. I just hold down the wheel button and use the ball to rotate the cube when the pointer is not on an open window.

        • On my desktop I do the same, but spend most of my online time on a little netbook – so reaching the touchpad corner is kinda convenient. I don’t like this new unity interface at all on my netbook though and stick to gnome-classic.

          • Interesting about Unity and the netbook, especially since it seems to be derived from the Ubuntu netbook version. I’m still on gnome classic w/AWN and expect to remain there.

  6. […] across desktops. The Compiz Cube, OTOH, can change desktops with a few simple and small motions. Enabling the cube in Unity isn’t a pretty process. […]

  7. Hello reformedmusings,

    Thanks for this post.

    I have Ubuntu 11.04 and I have followed this post to set up compiz.

    Although, I get most of the extra effects like moving windows, maximise windows etc. I cannot see the cube. I can see cube rotating for a fraction of second when I manually switch from one desktop to other by clicking on the different desktop. But, I cannot see the cube as you have posted. Any suggestions please (thanks).

    My graphic card is Intel Corporation Mobile GM965 / GL960 Integrated Graphics Controller.


    • Welcome!

      If you have the desktops set correctly, it’s probably just a question of the key or mouse bindings to execute. Mine is set to activate if I hold down Ctrl-Alt then click on my left mouse buttion. Than just move the mouse/trackball to rotate it. Or, I can press the center button (wheel) on my trackball while the pointer is on an empty spot on my desktop, then move my trackball/mouse around to rotate it. You might give those a try.

      You can set the rotation/flipping speed at ccsm -> Rotate Cube, General tab, Additional Settings at the bottom under Zoom.


  8. Hi there.

    I have managed to make cube work, but I didn’t follow your example. I just came across it and I have a question. Didn’t you Unity start to freeze after you’d enabled the cube? Mine did so now I am forced back on Unity…

    • Hi Igor!

      Thanks for stopping by. I recorded my trials above. Once I sorted out the correct order to follow, I didn’t have any cube-related issues per se.

      That said, most changes that I made to Compiz or Unity in Compiz Configuration Settings Manager caused Unity to crash and required logging off and back on. I don’t know if that’s still the case since I haven’t used Unity in quite a while now.


  9. Thanks for the tutorial couple of queries my compiz setting do not have as many options as yours such as 3d windows and cube reflections.

    Is there a reason for this i have done an update and upgrade to make sure im fully up to date.

    • Thanks for stopping by! Be you sure that you have all Compiz plugin packages, including compiz-plugins, compiz-plugins-main, compiz-plugins-extra, compiz-fusion-plugins-main, and compiz-fusion-plugins-extra. If you have all these, you should see the 3D windows, cube reflections, etc.

  10. cheers for that its working perfect!

    • Glad that it worked out for you! I’m very fond of the cube and its attendant effects.

  11. […] panes for more settings on customising the cube, and you’re on your way. Thanks to weblog Reformed Musings for these […]

  12. Thanks for the howto, easy enough to do, but I guess not that easy to figure out. Anyway, it worked as expected. You should just explain what the 2/2/1 and 4/1/1 means and how to change them, I had to Google it to understand what you meant.

    • Thanks for stopping by! I’m glad that you found this helpful. I’ll clean up the misunderstanding when I get a chance.

  13. Thanks so much for putting this out there! I’m unfortunately not getting the cube to rotate on it’s y axis so that I can actually see the caps like in your screencap. Instead, I’m getting a sphere or cylinder that I can see head-on.

    • Thanks for stopping by! Try turning off deformation. It’s been a while, but I believe that I had similar problems with deformation turned on.

  14. […] system came up as if nothing happened. The upgrade preserved my Compiz desktop setup perfectly, including my cube setup from Natty! One glitch, though. When I use the cube to change desktops, I get a very brief flash of the […]

  15. To get a decent screen shot in shutter, set a delay then capture the desktop. Then go into the cube, hold it and a capture will be taken.

    • Thanks for coming by and providing help.

      That’s what I was doing, but I believe there was an issue either with the video driver, compiz itself, or some funky interaction between on or both of them with both Shutter and the built-in Screenshot programs. Everything is working fine now in 11.10 Oneiric using the same approach.

  16. Thanks .. a lot buddy.. you helped me great in setting up the cube…
    My unity also crashed…thank god i had terminal icon on the desktop…. did unity reset .. then followed up your tutorial to get the cube

    • You are welcome! I’m glad that it worked out for you. Thank you for taking time to stop in and comment.

  17. […] my old instructions for how to get the cube and how to set it up in Ubuntu 11.04 still work. The 4/1/1 desktop setting […]

  18. hi, i messed up with CCSM and now everything is blank except for a panel on top… is there a way i could erase the compiz setting somehow? do help 🙂

    • Hi, Delete the ~/.compiz and .compiz-1 folders on your hard drive. This will reset compiz to its defaults.

  19. thanks 🙂 it worked, this had happened to me before too and since i didnot know the way to get it right, had to delete the account 😦 but now i got the trick..thanks to ya 🙂 cheers

    • Great! Thank you for reporting back on your results. Enjoy the cube!

  20. […] the setting necessary to make it work broke the new Workspace indicator on the Unity launcher. The cube requires that the workspaces be arranges as a 1 x 4 – all in one row. The Unity workspace indicator requires that the workspaces be arranged in the default 2 x 2 […]

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: