Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Ubuntu Rotate Cube: Set Up Desktop Effects

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can enable the classic rotate cube desktop effect on Ubuntu, but it requires a few extra packages and a switch to a supported desktop environment. The rotate cube is a Compiz effect, and modern Ubuntu uses GNOME, which no longer includes it. The simplest way to get it is to install the Compiz standalone window manager or use KDE Plasma with its built-in cube effect. This guide covers the Compiz route on Ubuntu 22.04/24.04, which is the most direct path. You'll need a working Ubuntu installation with an NVIDIA, AMD, or Intel GPU that supports hardware acceleration.

What You'll Need

  • Ubuntu 22.04 or 24.04 (64-bit) installed
  • A user account with sudo privileges
  • An internet connection to download packages
  • A GPU with working 3D drivers (most modern GPUs work out of the box)

Step-by-Step

  1. Install Compiz and the necessary plugins. Open a terminal (Ctrl+Alt+T) and run: sudo apt update then sudo apt install compiz compizconfig-settings-manager compiz-plugins-default. This installs the Compiz window manager and the configuration tool.
  2. Install a lightweight desktop session. The cube works best with a simple window manager. Install the Openbox session: sudo apt install openbox. You'll log into Openbox instead of GNOME to run Compiz cleanly.
  3. Log out and select Openbox. Click the gear icon on the login screen (or select the session menu) and choose Openbox. Log in with your username and password.
  4. Start Compiz manually. Once you're in the Openbox session, press Alt+F2 to open a run dialog, type compiz --replace and press Enter. This replaces Openbox's window manager with Compiz. You should see the desktop effects kick in (windows get shadows, etc.).
  5. Open the CompizConfig Settings Manager. Press Alt+F2 again and type ccsm to launch the Compiz configuration tool.
  6. Enable the rotate cube plugin. In CCSM, look for the Desktop category (left sidebar). Find Rotate Cube and tick the checkbox to enable it. Also enable Cube (under Desktop) and Cube Gears if you want the spinning gears animation.
  7. Set up the cube appearance. Click on the Cube plugin, then go to the Appearance tab. You can set the number of workspaces (default 4) and choose a texture for the cube faces. Leave the rest as default.
  8. Configure the rotate shortcut. Click on Rotate Cube plugin, then the Bindings tab. The default is Ctrl+Alt+Left/Right to rotate. You can change it to something like Ctrl+Alt+Button1 (mouse drag) by clicking on the binding and pressing the new keys.
  9. Apply and test. Close CCSM. Press Ctrl+Alt+Left or Ctrl+Alt+Right to rotate the cube. If it doesn't work, click on the desktop and press those keys again. The cube should rotate smoothly.
  10. Make Compiz start automatically. To avoid typing compiz --replace each time, create an autostart entry. Run nano ~/.config/openbox/autostart (create the folder if needed) and add the line: compiz --replace &. Save the file (Ctrl+O, then Ctrl+X). Now Compiz starts when you log into Openbox.

Common Mistakes

  • Enabling Rotate Cube without the Cube plugin. The rotate effect needs the Cube plugin to work. Enable both in CCSM.
  • Using the wrong session. If you try to run Compiz inside GNOME, it will conflict with GNOME's own compositor (Mutter). Always log into the Openbox session.
  • Missing 3D drivers. If the cube doesn't appear or is very laggy, your GPU drivers may not be installed. For NVIDIA, install the proprietary driver via sudo ubuntu-drivers autoinstall and reboot.
  • Forgetting to set the number of workspaces. If you have only one workspace, the cube won't show. The Cube plugin defaults to 4, but if you changed it, set it to at least 2.

Tips

  • Use a mouse binding for easier rotation. Set the rotate binding to Ctrl+Alt+Button1 (left mouse button) so you can drag the cube with the mouse.
  • Add the Cube Gears plugin for a fun spinning gear animation on the top and bottom of the cube.
  • Adjust the cube's speed in the Rotate Cube plugin's General tab. A higher value makes it faster.
  • If you prefer KDE Plasma, you can enable the cube effect there too: go to System Settings > Desktop Effects > Cube, but that's a separate setup.

Troubleshooting

If the cube doesn't rotate at all: First, verify that both Cube and Rotate Cube are enabled in CCSM. Then check that you're using the Openbox session and that Compiz is running (look for the Compiz icon in the system tray). If not, restart Compiz with compiz --replace.

If the screen flickers or windows disappear: This usually indicates a GPU driver issue. Update your drivers and ensure your GPU supports OpenGL. You can test with glxinfo | grep renderer; it should show your GPU, not a software renderer.

If Compiz crashes on startup: Try running compiz --replace --debug in a terminal to see error messages. Often, it's a missing plugin. Reinstall the plugins with sudo apt install --reinstall compiz-plugins-default.

If the cube is there but rotation is choppy: Reduce the number of workspaces (e.g., 4) and disable other heavy effects like Wobbly Windows. Also close any resource-heavy applications.

If you can't log into Openbox: Ensure you installed openbox correctly. If the session doesn't appear, run sudo apt install --reinstall openbox and reboot.

Frequently Asked Questions

Does the rotate cube work on the default Ubuntu GNOME session?

No. GNOME uses its own compositor and does not support Compiz plugins. You must use a different session like Openbox or switch to KDE Plasma.

Can I use the cube without installing Openbox?

You can try running Compiz on top of GNOME, but it will likely conflict and cause instability. It's not recommended. Openbox is a lightweight alternative that works seamlessly.

Will the cube work on Ubuntu 24.04?

Yes, the packages are available in the universe repository. The steps are the same for 22.04 and 24.04.

How do I change the cube's background color?

In CCSM, go to the Cube plugin, then the Appearance tab. There you can set the background color or use a skydome image.

Is there a way to get the cube in KDE Plasma?

Yes, KDE Plasma has a built-in Cube effect. Go to System Settings > Desktop Effects, search for Cube, and enable it. No extra packages are needed.

Can I use the cube on a laptop with Intel integrated graphics?

Yes, as long as the Intel GPU supports OpenGL 2.0 or later, which most do. If it doesn't work, install the mesa-utils package and check your OpenGL version.