Friday 13 August 2010

awesome on Fedora 13

Not only is the awesome window manager not shipped with Fedora 13, it doesn't even compile. Here's why, and how to fix it.

awesome communicates with the X server not through the xlib library like most people do, but through the newer xcb library. Under the hood both of these libraries talk the same X wire protocol to the server, which is why the server never needs to care which you're using. The principal relevant advantage of xcb here seems to be what the xcb people call "latency hiding" and Julien Danjou, the rather enthusiastic awesome lead developer, calls being "asynchronous" as opposed to "synchronous". As awesome uses the cairo library to do some of its drawing, it needs to have an xcb-enabled version of cairo available; the version of cairo shipped with Fedora 13 is not so enabled.

Fortunately, it is easy to build your own cairo:
  • install the xcb-devel and xcb-util-devel rpms from Fedora (this should be just "yum install xcb-devel xcb-util-devel" if you're set up properly).
  • grab the cairo source rpm from a Fedora mirror: source rpms are in releases/13/Fedora/source/SRPMS/ and the Fedora mirror list is at http://mirrors.fedoraproject.org/publiclist/Fedora/13/ .
  • install the cairo source rpm - this will give you a bunch of files in /root/rpmbuild , assuming you haven't changed your setup to make it do something else.
  • edit the cairo specfile (/root/rpmbuild/SPECS/cairo.spec) to build with xcb. All this needs is adding an extra argument, "--enable-xcb" to the configure invocation at line 58 of the file. You should also increment the release number (line 8 of the file) so that rpm will be able to see the package you're building is newer than the currently installed one. For bonus points, you can add an entry to the top of the changelog, but if you're not going to be distributing your new rpm nobody except me and Santa will ever know whether you do this or not.
  • build a new cairo rpm: "rpmbuild -ba cairo.spec". This will leave you with newly built cairo and cairo-devel rpms in /root/rpmbuild/RPMS .
  • install these rpms directly with the rpm command.

You can now build awesome in the usual way: download and untar the source then run "make", and as root "make install".

Now you've read that, here's the easy way: go to http://repos.fedorapeople.org/repos/thm/awesome/ , where Thomas Moschny has made available a modified cairo rpm and an awesome rpm to go with it. You can add one file, which he gives you, to your /etc/yum.repos.d and then just "yum install awesome". But aren't you glad you know what's happening and why you had to do that?

To make awesome your default window manager within the default Fedora GNOME setup, run:

gconftool-2 --set /desktop/gnome/session/required_components/windowmanager awesome --type=string

If you're going to run awesome, you probably won't want the GNOME panel so you can disable it:

gconftool-2 --set /desktop/gnome/session/required_components/panel true --type string

GNOME needs to think you have a panel configured but this command just sets /bin/true to be your panel so you don't get anything displayed.

Configuring and using awesome is outside of the scope of this document. But stick with it and soon you will find that all other ways of using a computer feel terribly clumsy.

No comments:

Post a Comment