01 December 2008

Compiz? Emerald? Metacity? What's the Difference?

Not for the first time, I found myself the other night explaining on IRC how the window manager and window decorator parts fit together. There seems to be a misconception that Compiz requires Emerald. That is far from true. There also seems to be confusion regarding what different kinds of themes do. So let's start at the basics.

The three most common window managers in the Ubuntu world are Metacity, Compiz, and Kwin. Yes, there are others, such as Enlightenment, Fluxbox, Xmonad, and Ion, but I'm not going to go into why each of them rocks. Metacity is the default GNOME window manager. Kwin is the KDE window manager. And then there's Compiz. Compiz is the compositing window manager that is enabled in Ubuntu by default if your system can handle it. The function of the window manager is to draw the windows in a certain place, with a certain size, and let them be movable and resizable.

Then you have the window decorator. This is where people get tripped up. The window decorator draws the window borders. It is not necessary to move the window, since alt+click&drag will still work even when the window decorator has crashed. I think the confusion comes from the fact that Kwin and Metacity have their decorators built in. Xmonad doesn't decorate windows at all. Compiz is a bit more modular in this regard. It has always been able to use Metacity's themes for the window borders. The window decorator in use when doing this is gtk-window-decorator. It can also use Kwin's themes, in which case you're using kde-window-decorator.

And then there's Emerald. Emerald was the window decorator for Beryl. Beryl merged back with Compiz a bit over a year ago. I remember Quinnstorm telling me she hopes "eventually to totally rewrite emerald," but that hasn't happened. Well, earlier this year, after noticing some glitches with my friend's Nvidia card and Emerald, I asked in #compiz-fusion and they said to stop using Emerald because it's not really being developed anymore and they'd rather everyone just switch to either gtk-window-decorator or kde-window-decorator. They did say that they were considering writing a replacement for Emerald, but that hasn't happened either. MOTU tried removing Emerald, I'm guessing due to its issues, but apparently a lot of people complained because they'd rather have a window decorator that crashes 3 times a day.

And now the last bit about themes. I said before that Compiz can use Kwin and Metacity's themes just fine thanks to kde-window-decorator and gtk-window-decorator. Some people are confused about what exactly comprises a Metacity theme versus a GTK theme, especially since they are installed in the same place. A GTK theme controls how buttons look, the colors of text, the window background, the scrollbars, and the menubar styles. The Metacity theme just controls the window border's style. For KDE, the Qt theme does the buttons, scrollbars, etc., and Kwin has its own themes for window borders, I think.


12 comments:

(``-_-´´) -- BUGabundo said...

Thanks.
This is a great explanation.

jacob said...

I use emerald as my window decorator in compiz, not because I like window decorators that crash three times a day (which has never happened to me), but because using compiz and kde-window-decorator doesn't seem to work yet in kde4.

hallowname said...

indeed, this will help many a newb who stumble upon it... i like you blog, your well versed on open-source to be so young.

el7azeen said...

why aren't there so many people like you?

thank you so much .. so easy to understand

uchari said...

can you share a screenshot of your desktop? what do you use?

Mackenzie said...

Right now I use Compiz with the Dust theme. I was using Xmonad (which has no window borders, so only the GTK theme matters) for a while as well, since I really like the tiling.

muhaafiz said...

Thanks a lot for such a lucid explanation!

fr said...

I finally got an overview of all those names of window managers which I found great compared to the poor environment (now I found it poor) of Windows Vista. I have not tried Windows 7 but the previews do not compare to what I have in my laptop: GNOME + metacity/Compiz + cairo-dock (preferred) + awn.

Wish you could speak about the docks. I like Cairo-dock with Open GL but sometimes it crashes or the confirmation dialogs cannot be clicked
growing dad

nnaji said...

whow, how late can i be with my comment?
haah, anyways thanks for this.
i had forgotten totally about what gtk-window-decorator was, you explained so well!

Lavi said...

wonderful write up. i believe i now get it... how does gtk 1.0 vs 2.0 fit into it?

Jwir3 said...

Thanks so much for all your assistance. You answered most of the very basic questions I have about Ubuntu Linux with your blog. I really appreciate you taking the time to jot down these notes, such as the difference between a window manager and a window decorator. It helps a lot!

Jwir3 said...

Thanks so much for taking the time for this explanation. Often, people tend to overlook that even some of the most tech savvy of us don't know everything. I was mystified by the difference between a window manager and a window decorator until I read your blog posting. I really appreciate your willingness to jot down an explanation. Thanks!