Friday, November 13, 2009

Compiz-Fusion in Gentoo

The Gentoo Linux Wiki has a short but decent article on installing Compiz-Fusion. However, after following the article myself, I found it was missing some rather important information. I'm running Compiz-Fusion with Gnome using an nVidia based card, just so you know.

First, I would like to point out that enabling the emerald use flag is not required. Emerald is a nice window decorator that provides some extra eye-candy for window borders, title bars, and title bar widgets. You will also get a good selection of themes to choose from. If you would rather not install Emerald, compiz will use gtk-window-decorator as the default window decorator. Basically, it will honor the appearance settings you've configured in Gnome's control center while adding some transparency effects to window title bars.

OK, so you've emerged x11-wm/compiz-fusion. At this point, the wiki article instructs you to run compiz-manager in a terminal. Don't. It will probably work, but it won't be pretty. You won't be able to move or resize most windows, none of the windows will have decorations, and there may be some other problems as well. Instead, you'll need to take some time to configure Compiz-Fusion first. Open the CompizConfig Settings Manager, which can be accessed through gnome-control-center or from the Preferences menu. At a minimum, you'll want to enable the following:

Category: General
  • Gnome Compatibility
Category: Effects
  • Animations (not required, but nice to have)
  • Window Decoration
Category: Utility
  • Workarounds (I had to enable "Force synchronization between X and GLX" to clear up some odd behaviors)
Category: Window Management
  • Move Window
  • Resize Window
Now open a terminal and run compiz-manager.

Finally, you'll want to setup compiz-manager to run automatically when you log in. The wiki article provides two methods. The gconf approach alone did not work for me. When I logged in, there was no window manager running at all! Simply adding compiz-manager to my session worked, but metacity was still starting up first then being replaced by compiz. What finally did work for me was a hybrid approach (I make no claims about the correctness of this solution). I used gconf-editor to update the specified value, and also added an entry to my session to run compiz-manager.

I have only had one problem thus far which I am still investigating. At some point while I'm logged in, most windows will stop using the selected cursor theme. Usually, logging out and logging back in is enough to fix it (possibly restarting compiz-manager would also work).


Anonymous said...

Thanks! Helped me out and works great.

Nick said...

Thanks. I was stumped about the strange behavior before I read this and realized window decoration and moving/resizing windows was disabled. I've added info to the relevant Gentoo Wiki page.

Vicfred Anonymous said...
This comment has been removed by the author.
Vicfred Anonymous said...

I had to run `gtk-window-decorator --metacity-theme "Equinox Evolution Dawn" --replace &` to change the default metacity theme. Now I'm guessing how to make that permanent/automatic.

Of course change the name for the theme you are using.

Vicfred Anonymous said...

I set that command in the window decoration options and now it's working fine, I hope it helps someone.

Keyser Söze said...

thank you :-)