Xubuntu 13.10, Compiz, and Emerald

April 14, 2014
compiz01Ah, Compiz. The graphical darling of the Linux world that instantly grabs people’s attention and makes them ask, “Cool! How can I make my computer do that?”

Ah, Compiz. Why must you be so quirky?

Before Unity and GNOME 3, Compiz and Emerald were easy to setup and run most of the time. The Ubuntu 10.10 era made the process simple, and Linux Mint 10 was even simpler.

These days, Compiz and Emerald can be a struggle. Are they feasible on today’s distributions? Yes, but… Being a tremendous fan of Compiz and Emerald, I resolved to make them work in Xubuntu 13.10 and Linux Mint 16 MATE, and this led to contradicting results yearning for the “good ol’ days.”

Installing Compiz and Emerald

Compiz and Emerald work in Xubuntu 13.10 and Linux Mint 16 MATE, which were the only two distributions I tried for this review. Compiz also works with Ubuntu 13.10 Unity, but Cinnamon desktops will not function with Compiz. This means that if you want to use Compiz effects with Linux Mint 16, then you must use Linux Mint 16 MATE, not Linux Mint 16 Cinnamon.


If running on real hardware, the desktop cube and other Compiz effects work in Xubuntu 13.10. If running in a virtual machine as shown here, Compiz effects still work, but window decorations will be missing.


1. Install Compiz

sudo apt-get install compizconfig-settings-manager

Compiz will probably already be installed, but if not, this should grab any dependencies. Synaptic will provide a list of Compiz packages for more details. The strange aspect of Compiz included by default is that even though it might be installed, its configuration manager might not, so there is no way to configure it. This is what compizconfig-settings-manager is for.

2. Install Emerald

Emerald provides slick-looking window decorations that are far more advanced and attractive than anything GTK can offer. Transparency, blurred title bars, text and button placement, borders, and gradient colors are a few of the many customizations possible.

It is a shame that Emerald has been abandoned, and it is also a pity that Emerald is not available from the standard repository because this means extra installation effort. Version 0.9.5 is still available as compilable source code or as a precompiled package from alternate repositories.

Precompiled Package

One such alternate repository is from webupd8 [http://www.webupd8.org/2013/05/how-to-install-emerald-in-ubuntu-1304.html]. The easiest installation method is to install from this repository and then keep a copy of the .deb file (check /var/cache/apt/archives).
Add the Repository

sudo add-apt-repository ppa:nilarimogard/webupd8

Update and Install

sudo apt-get update
sudo apt-get install emerald

Compiling Emerald Yourself

It’s not scary.

1. We need to install some compiling tools, so copy and paste this line into a terminal and run it.

sudo apt-get install autoconf libtool libwnck-dev intltool libwnck1.0-cil-dev libdecoration0-dev gawk git

This is a mish-mash of packages from various tutorial sites. It has always worked for me despite some tools not being needed or others already installed.
2. Download the emerald source code.


Get the latest version, which is 0.9.5 as of the time of this writing. Files .tar.gz and .tar.bz2 are different compression mechanisms. It makes no difference.
3. Extract emerald-0.9.5.tar.gz to its own directory.

4. Open a terminal in the Emerald source directory just extracted. Enter the following commands in order:

make clean
make distclean
./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} LIBS='-ldl -lm'
sudo make install

If errors occur, pay attention to them since they might indicate missing packages required for compiling.

Testing Emerald

Check if emerald works by entering the following command in a terminal:

emerald --replace

Title bars of new and existing windows should change to a shiny, glossy red by default. If Emerald hangs at the command prompt and does nothing, then Emerald is probably not going to work. This happens with VirtualBox 4.3.10.

Other Emerald themes are available for download (they have a .emerald filename extension), and they can be installed using the Emerald Theme Manager.

Xubuntu 13.10 System Settings showing Emerald Theme Manager choice.

Xubuntu 13.10 System Settings showing Emerald Theme Manager choice.

Emerald Theme Manager

Emerald Theme Manager with the Halftime theme installed.


Configuring Compiz

Before we can run Compiz, we must ensure that some plugins are enabled. Open the Compiz Settings Manager.


Compiz Settings Manager. Checked items are enabled plugins. Unchecked items have no effect.


  • OpenGL
  • Composite
  • Gnome Compatibility
  • General Settings > Desktop Size > Horizontal Size: 4 The desktop cube needs more than one in order to flip. This settings determines how many workspaces are available when Compiz is enabled. This is separate from the Xubuntu workspace manager.


  • Viewport Switch
  • Desktop Cube
  • Rotate Cube


  • Window Decorations
  • Animations
  • Fading Windows


  • Compiz Library Toolbox
  • Regex Matching
  • Mouse position polling
  • Session Management
  • Workarounds

Window Management

  • Maximumize
  • Put
  • Scale
  • Snapping Windows
  • Move Window
  • Resize Window
  • Grid
  • Place Windows
  • Ring Switcher

You must tell Compiz specifically what to do with windows. For example, windows will not resize unless the Resize plugin is enabled. If you cannot resize windows by dragging the borders, then check to see if the Resize plugin is enabled.

Not all of these plugins are required for Compiz, but they provide plenty of usable functions.

Specify A Window Decorator

This draws the title bar and borders around a window. Emerald is among the best, so to use Emerald, open the Window Decoration plugin located in the Compiz Settings Manager.


Compiz Window Decoration plugin draws title bars and borders around windows.

In the Command text field, enter emerald. When Compiz starts, it will use whatever window decorator is specified here. The default is /usr/bin/gtk-window-decorator/


When Compiz is enabled, Emerald will theme the windows.

Another option is to use emerald –replace for the command.


Command using emerald –replace will also work.

Both worked for me, so it made no difference which was used. Depending upon your system configuration and distribution, this might make a difference.

Testing Compiz

In a terminal, enter,

compiz --replace

The screen should blink a few times, and Compiz should activate. Windows borders and title bars should replace the system defaults.

Compiz Not Saving Settings (Probably Optional)

So, you tweaked Compiz just the way you like it only to find that all settings are gone upon the next reboot. What happened? Here is yet another quirk: In some distributions, Compiz never saves the settings. I never encountered this problem with Xubuntu 13.10 or Linux Mint 16 MATE, but I did run into it with previous distributions, such as Xubuntu 12.04.

Open the Compiz Settings Manager and open Preferences. Where Compiz saves its settings is determined by Backend.


Compiz Settings Manager Preferences. The item chosen in Backend determines where Compiz will save its settings.

By default, Flat-file Configuration Backend is chosen. This seems to work fine with Xubuntu 13.10 and Linux Mint 16 MATE, but with 12.04, 12.10, and 13.04 distributuions, it never saved — at least for me.

The solution is to install dconf or gconf (or both depending upon the case), and then set the Compiz Backend to GSettings Configuration Backend instead of Flat-file.

sudo apt-get install dconf-tools gconf-editor



If Flat-file Configuration Backend does not work, choose GSettings Configuration Backend.

Compiz saved the settings correctly. Sadly, this depends upon distribution version. In some distributions, gconf would work. (This requires editing within gconf-editor.) For others, Compiz needed dconf. It was mostly trial and error. Hopefully, this should no longer be an issue with 13.10 and above.

Compiz at Xubuntu Startup

Once Compiz and Emerald are functioning properly, you might want Compiz to start with your session automatically instead of entering compiz –replace each time. Do this by editing the xfce4-session.xml file.

1. Copy xfce4-session.xml to home. This avoids editing the original file.

cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

2. Edit xfce4-session.xml so it loads Compiz instead of xfwm4.

Locate the file just copied, and open it in any text editor.

gedit xfce4-session.xml


gedit ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

On line 14 in Xubuntu 13.10 (or around line 14), look for the value element containing value=”xfwm4″. Here is a snippet of code area to assist identification:

<property name="Failsafe" type="empty">
 <property name="IsFailsafe" type="bool" value="true"/>
 <property name="Count" type="int" value="5"/>
 <property name="Client0_Command" type="array">
   <value type="string" value="xfwm4"/>

Gedit showing xfce4-session.xml with line 14 highlighted. We need to change the xfwm4 to compiz.

Change the xfwm4 to compiz.

<value type="string" value="xfwm4"/>


<value type="string" value="compiz"/>

Save the file. Now, when you log in to Xubuntu 13.10, Compiz should activate instead of the default xfwm4.

To return to xfwm4, change compiz back to xfwm4, save, and logout.

Alternate Startup

If this technique does not work, then try starting Compiz by adding it to the startup applications. Go to System Settings and choose Session and Startup.


Xubuntu 13.10 System Settings highlighting the Session and Startup choice.

Choose the Application Startup tab.


Session and Startup Application Autostart tab.

Click the Add button, and enter,

Name: compiz
Command: compiz --replace

Adding a startup application.

Click OK, check that the new entry appears and it is checked.


The new Compiz entry appears in the startup applications list.

Logout. Compiz should automatically start upon the next login or reboot.

The screen might look like this for an instant:


Upon each login, Xubuntu switches to this momentarily as Compiz activates. This is especially noticeable in VirtualBox. Yet another quirk.

To return to normal, uncheck or delete the compiz entry from the startup applications and logout.

Real Hardware vs. Virtual Hardware

There is a difference. Surprisingly, installing Compiz and Emerald on real hardware (Xubuntu 13.10) ran fine. Compiz quirks existed, due to extra plugins, but the desktop cube and other Compiz effects ran fluidly. Emerald added its decorations without problems.

However, VirtualBox 4.3.10 was different. Compiz and Emerald running on Xubuntu 13.10 or Linux Mint 16 MATE virtual machines were more than quirky — they were almost unusable. Compiz would install and run, but all window decorations would be missing due to Compiz not finding a window decorator.


Xubuntu 13.10 in VirtualBox 4.3.10 with Compiz off. Default xfwm4 produces the window decorations, so we see title bars and borders around the windows.


This is the same Xubuntu 13.10 virtual machine in VirtualBox 4.3.10 with Compiz enabled. All window decorations are missing. This behavior was consistent across multiple virtual machines. Xubuntu, Linux Mint 16 MATE, 32-bit, and 64-bit all failed to draw window decorations despite all settings properly configured in VirtualBox.

This was bizarre because I used the exact same installation procedure. Window decorators were installed, and a few, such as xfwm4 and gtk-window-decorator would function as long as Compiz was not running. Emerald absolutely refused to run inside a virtual machine. Entering emerald –replace did nothing. The terminal stalled at the prompt.

But the moment Compiz was activated with compiz –replace or by editing xfce4-session.xml, Compiz would activate, but all window decorations would be missing even though the Compiz Window Decoration plugin was configured with a specific command given in the Window Decoration General tab. Not even the default /usr/bin/gtk-window-decorator worked.


Compiz effects run fine inside VirtualBox 4.3.10, but window decorations fail. Here, we see the fire mouse cursor and rain drop effects, but no title bars or borders around windows despite Emerald installed and configured.

Considering that the same installation process was performed for both real hardware and a virtual machine, I would guess that the issue lies with VirtualBox. This has happened before in the past despite double-checking that all VirtualBox settings were enabled to allow 3D operations.

In the past, during the transition from VirtualBox 3 to 4, a few Compiz effects would not function properly in VirtualBox 4.x.x despite functioning perfectly in earlier versions. It took a few revisions, but VirtualBox gradually returned to normal only to lose its compatibility again.


Compiz in a virtual Xubuntu 13.10 or Linux Mint 16 MATE produces this output in a terminal. In this case, Compiz says it cannot find a window decorator even though the Window Decorator plugin is configured to use one. Not even the default Compiz settings work.



Given the increased hassle, is Compiz and Emerald worth it? In my opinion, yes — for hardware. Yes, it requires more effort to enable than in days past, but the visual rewards remain exciting. Nothing can replace the joy of watching the desktop cube rotate with fluid-like motion or enabling desktop effects that mesmorize the mind.

VirtualBox is another story. There is little point in using Compiz or Emerald in a virtual machine because window decorations disappear despite Compiz working, and this interferes with computer usage. What good is a window that cannot be moved, closed, or resized due to missing title bars and buttons?

If your system supports Compiz and Emerald and you like glitzy effects, then give it a try!

, , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: