Posted on September 21, 2012
How to install Compiz on Fedora 17 XFCE Spin
Let’s just be clear, this is not for the faint of heart.
Why isn’t Compiz in the Fedora 17 repos?
Compiz is a replacement window manager for the GNOME window manager called Metacity. When GNOME 3 came out last year, they replaced Metacity with Mutter. Apparently there are library incompatibilities that prevent Compiz from replacing Mutter. I didn’t look into the details because we don’t care about GNOME issues, we’re XFCE users!
I’ll also note that Red Hat is currently reviewing the situation and might bring Compiz back. Who knows. I for one think it’s silly to drop a package just because it doesn’t work with one desktop environment out of many.
Why I love Compiz (you can skip this)
I like Compiz a lot and not because of the silly effects. The #1 feature to me is the grid plugin. I press Ctrl+Num7 and my window auto resizes to the top left corner. I press Ctrl+Num4, it resizes to the whole left half of the screen. If I press Ctrl+Num4 twice it takes up 1/3 of the left hand side and then I press Ctrl+6 3 times on another window and that one takes up 2/3 of the right half of the screen. You get the idea. Compiz is the best tiling window manager I’ve every used and it’s not even a tiling window manager.
It’s awesome, it makes you way more productive, and nothing even comes close to rivaling it. I could live without every other part of compiz (though the slick effects are nice) but the grid makes it worth it.
Installing Compiz
First you need to download the relevant rpm packages from the Fedora 16 repository. I’d suggest making a new directory called “compiz-rpms” or whatever you want.
Required Packages
Shout out to Brombor on the Fedora forums for making this list. All the linked packages below are for the x86_64 version. (Link to the i386 repo if you need it).
- boost-serialization
- libcompizconfig
- ccsm
- compiz
- compiz-bcop
- compiz-fusion-extras
- compiz-fusion-extras-gconf
- compiz-gconf
- compiz-gnome
- compiz-gtk
- compiz-manager
- compiz-plugins-main
- compiz-plugins-main-gconf
- compizconfig-backend-gconf
- compizconfig-python
Or you can be a cool kid and just do
wget -v http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/boost-serialization-1.47.0-3.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/libcompizconfig-0.9.5.0-2.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/ccsm-0.9.5.0-1.fc16.noarch.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-0.9.5.0-4.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-bcop-0.8.8-1.fc16.noarch.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-fusion-extras-0.9.5.0-3.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-fusion-extras-gconf-0.9.5.0-3.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-gconf-0.9.5.0-4.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-gnome-0.9.5.0-4.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-gtk-0.9.5.0-4.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-manager-0.6.0-13.fc15.noarch.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-plugins-main-0.9.5.0-2.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-plugins-main-gconf-0.9.5.0-2.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compizconfig-backend-gconf-0.9.5.0-1.fc16.x86_64.rpm http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compizconfig-python-0.9.5.0-1.fc16.x86_64.rpm
Install boost-serialization
Once you install boost-serialization, you have to prevent it from updating. Install the version lock plugin and boost-serialization.
yum install yum-plugin-versionlock yum localinstall boost-serialization-1.47.0-3.fc16.x86_64.rpm
Lock boost-serialization
yum versionlock boost-serialization
Install everything else
yum localinstall libcompizconfig yum localinstall ccsm yum localinstall compiz*
You could technically run compiz at this point and have wobbly windows and all that stuff, but you’d be missing one important thing… a window decorator. All your window buttons (close, minimize, ect) will be gone. So unless you feel like holding Alt to move windows and using shortcuts to close them, I’d suggest installing emerald.
Installing emerald
You can’t just install emerald from the Fedora 16 repo because it conflicts with compiz-plugins-main.
Option 1: Use my RPM
I already built the emerald package for my own use so I’ve uploaded the rpm to my github (download here). If you’re running the XFCE spin of Fedora 17 x86_64, then you should be able to just download this and install it with
rpm -ivp emerald-0.9.5-0.1.rpm
If this works, then you’re in business and can skip to the section “Running Compiz.” But remember that if you have issues with the window bar not showing up then you should remove my emerald package and build your own.
Option 2: Compile emerald from SRPM file
An SRPM file is the source code + SPEC file (build instructions). It usually has the extension .src.rpm. I’ve uploaded the SRPM of emerald-0.9.5-0.1 to my github account. SRPM download
How to create an RPM package
Here are the instructions that I followed from the Fedora wiki
http://fedoraproject.org/wiki/How_to_create_an_RPM_package
I’ve provided abbreviated instructions below, but if you have problems then you should consult the wiki guide.
Step 1: Compiz-Devel
To build emerald you need to install compiz-devel and to install compiz-devel you need install some other packages. So lets get that out of the way.
yum install libwnck-devel gtk2-devel intltool libtool gettext-devel libXres-devel
Download and install compiz-devel
wget http://archives.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/compiz-devel-0.9.5.0-4.fc16.x86_64.rpm yum localinstall compiz-devel-0.9.5.0-4.fc16.x86_64.rpm
Step 2: Preparing your system
Install some core development tools
yum install @development-tools yum install fedora-packager
You never want to create packages as root. We’re going to create a new user named makerpm, add the user to the ‘mock’ group, set a password, and login as that user
/usr/sbin/useradd makerpm usermod -a -G mock makerpm passwd makerpm su - makerpm
Make sure you’re logged in as the dummy user and in their home directory. Then create the required directory structure.
rpmdev-setuptree
Step 3: SRPM to RPM
Chances are that the emerald SRPM you downloaded is owned by your user account. Move it to the homedir of your dummy account and chown it to them.
Create a directory and unpack the SRPM
mkdir emerald_src_rpm cd emerald_src_rpm rpm2cpio ../emerald-*.src.rpm | cpio -i
Let’s just verify the spec file real quick
rpmlint emerald.spec
Create binary RPMS
rpmbuild -ba emerald.spec
If successful, the RPMS will be created within ~/rpmbuild/RPMS/
Lets verify that the build worked correctly
rpmlint emerald.spec ~/rpmbuild/RPMS/*/emerald*.rpm
I got a few warning but no errors. If everything went well for you, enter the ~/rpmbuild/RPMS directory and into the architecture subdirectory. Install your new emerald package from root with
rpm -ivp emerald*.rpm
Running Compiz
Enable plugins
You need to activate a few plugins that provide basic window manager behavior or else you will have no ability to drag, scale or close any windows as soon as compiz is activated. These plugins should be enabled by default, but lets be sure. Open the Compiz Settings Manager
ccsm
and put check marks next to “Window Decoration” under Effects and “Move Window” & “Resize Window” under Window Management.
Replace xfwm4 with Compiz
Easy peasy. To start Compiz and Emerald together, just run
compiz-manager &
What if something goes wrong?
Window decorator isn’t appearing
Switch back to xfwm4.
xfwm4 --replace &
Screen locked up
Ctrl+Alt+Backspace will automatically log out you.
Taskbar and Desktop not appearing
The screen locked up, you ctrl+alt+backspaced out, and now every time you log in you get the same broken Compiz session. You need to clear your session cache.
rm ~/.cache/sessions/*
Start Compiz Automatically
After you’ve verified that Compiz/Emerald is working correctly, you can set it to start automatically when you log in.
Start > Settings > Session and Startup > Application Autostart
Add a new item
(Name) Compiz
(Description) Start Compiz
(Command) compiz-manager
Now Compiz should start automatically, every time you log in.
Note: If something breaks and you need to stop Compiz from starting automatically but you can’t access the GUI, this is how you disable application autostarts from the command line:
cd ~/.config/autostart/ rm Compiz.desktop
Bug fixes
I’m just going to post random bug fixes as I encounter them (hey, I never told you this was stable).
Tooltips and Menus not showing correctly
There’s a weird bug with XFCE and Compiz where tooltips don’t display correctly some times. Open up the Compiz Settings Manager (ccsm), scroll down to “Effects”, and enable “Animations.” Now tooltips display correctly every time!
Compiz crashes with the error “/usr/bin/compiz-manager: line 367: Segmentation fault”
It was to do with the grid plugin. Open ~/.config/compiz-1/compizconfig/Default.ini and remove “[grid]” and everything under it.
Compiz-manager won’t start after installing the latest video drivers, “No whitelisted driver found”
I installed the latest ATI Radeon video drivers and now compiz-manager refuses to start because my drivers aren’t in the whitelist. Rather than use compiz-manager to start compiz and emerald, we can start the both manually.
LIBGL_ALWAYS_INDIRECT=true compiz --replace --ignore-desktop-hints ccp & emerald --replace &
Setting LIBGL_ALWAYS_INDIRECT to true is necessary if you’re running AIGLX.
I’m not sure what –ignore-desktop-hints does, but its a recommend option on compiz.org
ccp uses compizconfig for settings (so you have window decorators and stuff)
Make Compiz start automatically again
Try out the above command and verify that it works.
Remove your XFCE Autostart entry via the GUI or deleting the .desktop file in ~/.config/autostart/
Add the above command to your ~/.bash_profile file
Log out and in again
Thank you! I was missing compiz and emerald. The world is right again :)
thanks a bunch!!!
fortunately, i didn’t have to install emerald to get things working right!
Thanks god, This is a workaround, i hope they back compiz to main repositories again …
This was helpful. I accomplished two things: learned how to get compiz on F17 (duh) and how to install KDE 3 on Fedora (original RPMs). I’ll post a guide to it when I have tested it a little more completely.
I’m on FedoraForum as Ihatewindows.
Thanks so much! I use Fedora and XFCE and could not care less that it conflicts with Gnome. I’m just thrilled that my laptop is back in a perfect shape after my F16 upgrade :)
Thanks a bunch!
Hi Colin!, thanks for sharing all this knowledge with us, I have a question, do you know if this procedure apply for Fedora 19 or 20 XFCE?, thanks in advanced
Edgar García!
Red Hat returned the compiz package in Fedora 18, so only people using Fedora 17 have to go through all this. You should just be able to install compiz as you would any other package.
I can’t give you a definite answer though, I only used Fedora on my laptop while my desktop was out of commission. My main distro is Arch; you should give it a try.
I read this paragraph completely about the comparison of latest and previous technologies, it’s amazing
article.