Monday, January 30, 2006

Moving from Metacity to a Better City

Ok. It's time. I have used my own new guide long enough I can suggest others try it too. It may not be perfect, but it works really well and I think it's the best solution to the problem for now.

But lets start at square one- what is the problem?

The problem is that Metacity is really boring. Not kinda boring. Really boring. In Breezy I begged and pleaded to make sure it was not compiled with a compositor so that excitement could be bolted on (by running Xcompmgr) easily...but that solution had a certain shelf life.

The essential problem is that Metacity was never meant to be exciting. Here is the description from the authors own words:

"Boring window manager for the adult in you. Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios."

Well I don't know about you, but I get tired of eating plain Cheerios everyday. Sure you can add some sugar and some fruit (xcompmgr) but eventually even that gets boring. After a while I want to go to the store and buy some Frosted Flakes, some Fruity Loops, or some Lucky Charms. I have a sweet tooth, I will admit it. But I am sure others do too.

Lucky Havoc Pennington brags that even though he made Metacity boring, he spent a lot of time making it easy to replace. Well....not too easy. But possible. And I thank him for that. At least he had the wisdom to see that not everyone could stand to eat Cheerios all the time and act like adults.

Heck, it's my personally belief (based on reading many mailing lists about the subject) that Metacity would not get a compositor built in for a VERY long time if it wasn't for the fact that it can possibly help usability (by having a really nice screen screen zoomer). The Kwin concept of adding this stuff for the fun of adding it seems to be lost on the Gnome community (except for the actual person making most of the Metacity compositor- Soeren Sandmann- who lucky cares enough about eye candy to include things like a minimize effect). That is what happens when you hang out with the business crowd I guess.

With many things in life you do not know what you are missing until you are actually sitting on the other side of the fence. Personally I did not know how boring Metacity was till I starting making a report for my blog about KDE eye candy (that is now so large I think I will have to do many entrys to cover it). The compositor in KDE's window manager- Kwin- could do so many amazing things by default I knew I could never live with xcompmgr again. I had to steal Kwin for my own purposes.

Some might ask “why not just KDE you freaking idiot?” And that is a good question. My official answer is:

1.I like Gnome Applications more. Firefox. Gaim. Nautilus. Gimp. etc. I hate for them to look like crap in KDE. Running gnome-settings-daemon in KDE would do the trick, but they do not play well together always. The "use QT themes on GTK apps" trick is buggy.

2. I dislike the kicker (KDE panel). I prefer the Gnome panels.

3. I like for Nautilus to draw my desktop. I prefer Gnome's automounting.

4. The Industrial theme is better than any KDE theme I have tried. In fact...I have never found a KDE theme I like (compared to GTK themes- even Clearlooks is better). Plus it's easier to install themes in Gnome.

In fact recently I found a Cairo Industrial theme that changed my life. The pure white of Industrial combined with the candy scrollbars of Clearlooks Cairo. I tried to make this myself for a month but then this one came along and blew my work away. With this in existence I will never be able to switch to KDE. Find this theme here:

5. Ubuntu is the primary distro of all the buntu's so it gets the most work done on it.

I just want KDE's window manager, so I took it. Now there is no need to switch to KDE for me and others. Its the best of both worlds.

And overall it works really well. I do not have the conflicts with mixing the two like in Hoary, even after two weeks of solid use.

And now the question is “what does Kwin offer me to make it worth the switch?” Good question and one I get a lot. Well, first is the translucent gnome- panels. Second is drop shadows in a better form- using drop shadows for a long time with Xcompmgr is painful because it has a bad memory leak. Kwin has the same leak, but it is WAY better. Third is smooth fading just like the trick xcompmgr can do.

But thats just the tip of the iceberg.

Of course, only screenshots can do it justice. So first of all here is a screenshot of how Kwin's compositor even makes the Gnome Panels translucent- notice the “CNN” shining through:

Also notice how well the blue scrollbars from Clearlooks Cairo work so well with the Smooth Blend KDE theme. It really looks like they were meant to go together.

Finally notice in that screenshot how the maximized window in the background had a maximize button next to the close button while in the smaller window that button is changed to a maximize button that looks different. That particular Kwin theme does that by itself! Maybe only people like myself notice that, but after a while it becomes really obvious how many releases Kwin is ahead of Metacity.

With Kwin you are able to make non-focused windows transparent:

Notice how the calculator and terminal are made translucent automatically when the focus is on another application (Firefox). Blends right into the Ubuntu desktop.

Yet after a while making entire windows translucent is not as cool as it seems. Some may disagree, but it got on my nerves after a while. Microsoft discovered this exact problem while making Vista- not all bling is a good thing. This is why I never messed with scripts that allowed for Xcompmgr to do such things.

Luckily Kwin can go one step further. In its options you can chose:

“Apply translucency only to decoration”

With this option checked, only the window borders are translucent. I prefer this for day to day use. I make my focused window non-translucent but make it so when I move windows or when they are not in focus they are translucent. Helps a lot with keeping track of many windows...and it's also very close to the “Aeroglass” effect that Microsoft will announce to the world as “true innovation” later this year when Vista (maybe) releases. Well here is Kwin doing its best Aeroglass imitation before Aeroglass exists:

Nice huh? Yep, I can't do without Kwin now.

Once you use it for a while, Kwin also shows gives many other benefits that Metacity can never provide. Like what you ask? Customizations. Within its many options, Kwin lets you:

1.Set edge flipping exactly how you want (edge flipping is when you move off the screen onto another virtual desktop- you need the program called Brightside to do this with Gnome)
2.Set edge resistance- very helpful for a two screen setup like mine
3.Configure the exact window actions and focus settings to an amazing degree
4.Have themes that are customizable to an amazing degree

And more. All by right clicking the titlebar and choosing the “Configure Window Behavior” option. This combined with overall less resource use (even with the compositor in Kwin off for a couple days I could tell that is it uses way less CPU than Metacity) and the fact that the horrible “draw black crap all over you screen” minimize effect from Metacity is taken away makes me recommend replacing Kwin with Metacity even for those who are not interesting in things like drop shadows and translucency.

Until Dapper comes I see no good reason to use Metacity.

Of course like most things in life replacing Metacity with Kwin will bring sacrifices. First thing is that the “run dialog” shortcut won't work- even if you add it to the gnome panel! This is painful for me, but this solution was found:

Another problem is that sometimes Kwin's compositor will have visual bugs. This is no big deal if you use xcompmgr as you are used to it. Here is a screenshot of a Kwin visual bug:

See how the right side of the window is cut off? Well...that is the worst problem you will find with this set up.

But its not the end of the world. Just grab that window by the titlebar (or where the titlebar should be) and shake it around some. That cures 99% of visual composite bugs.

Heck, even my sister's Powerbook with OSX Tiger sometimes shows me things that are definitely composite bugs:

These visual composite bugs will exist in Linuxland for a VERY long time I think (composite is a hard animal to tame) so it's better just to learn to deal with them I say. Others might think differently.

With the newest Nvidia drivers the worst Kwin has given me is these few visual bugs. No major Xserver crashes! That alone is worth throwing a party for. Here is the guide to get the newest Nvidia drivers:

So in the end I suggest everyone who likes Gnome and eye candy switch from Metacity to Kwin. Finally, here is my guide to tell you how to do all this:

Please leaves comments in that thread, in my email box, or on my blog if you have problems. Its worth a shot at least.

Some might notice it looks a lot like my old Enlightened Gnome guide:

So I might as well say now that I advise using Kwin over E17 or E16. E16 is far too primitive to be using in 2006, and E17 does not play well with Gnome. This is why I never updated this guide for Breezy. The Knome Guide is the newest fun trick on the block, so that is where the new party is. You are welcome to try it if you want.

Now for some other issues before I end this blog entry. First of all I found a screenshot showing work done to move OSX Dashboard widgets to Gnome:

I think thats pretty cool myself. The code can be found here:

Its worth messing with for those that like those sorts of things. For those of us who prefer a Gnome solution, Gdesklets had an update:

This update seems to bring bugfixes- and we all know that the last version of gdesklets needed plenty of that! So its well worth trying out.

Also someone was nice enough to make an Xgl guide for Breezy:

I have not tried it (shock!) as I am waiting for the release of the new compositor related to it in February to try it out. Xgl without a compositor to take advantage of it is a waste for someone like me that changes video cards in a blink of an eye to get better eye candy (the benefit of Xgl to others is that with it stable more people could get eye candy as long as their driver has decent Opengl support)....the glxcompositor does exist in the wild but it needs CVS Xserver to work with a patch to mesa, so that's out. The first month of the year is almost over, I can wait. If you can't then start compiling and tell me how it goes!

Finally I want to point out some Firefox eye candy. I recently ran across this extension:

Which takes the most innovative thing Internet Explorer 7 will do in the future when it is released and adds it to Firefox. Poor IE- it can never win at being the best with a disadvantage like that! Luckily it has other advantages (similar to why a stone rolling down a hill does not stop) that means that it does not need to be the best to succeed.

This extension even gives a tutorial on its first use. I recommend it even for the most timid of users. Note that you need the newest Firefox release (1.5) for it to work well. Use Automatix to get that in Ubuntu if you lack it.

Well that is all for this entry. Enjoy freedom from the city of Meta, and stay tuned for my next rant///////blog entry!


Blogger Galoot said...

I wish I had half the horsepower you do, Phg. I'd love to try some of your tweaks.

8:16 PM  
Blogger Bobby said...

firefox is not a gnome application

8:25 AM  
Blogger Bielawski said...

Firefox is more of a GTK+ app than a Qt one - the Mozilla Qt port disappeared long ago.

11:45 AM  

Post a Comment

<< Home