返回正常中文阅读

想对这篇译文“指手画脚”吗?

您的参与将有助于译者提高译文的质量;同时,大家一起对问题的讨论也是最佳的学习方式。还等什么?请现在就注册登录译言,开始眉批!
大错 小错 不顺 建议

Compiz Fusion on CentOS 5

I haven't really been that interested in the projects working to provide eye candy for the Linux desktop.  I couldn't really see the practical application of desktops spinning on a cube or wobbly windows.  However, at a recent meeting of our local LUG (ColaLUG -- stop by if your ever in the Columbia, SC area) one if the attendees mentioned that recent versions of Beryl and Compiz Fusion had features that actually improved desktop productivity.  Things like window zooming, Expose like task switching, etc.  I decided I should give it a spin.

(Updated Mar 20th, 2008)

Updated -- Due to popular demand I've released updated packages from Compiz Fusion 0.7.2.  They are lightly tested but you can get them at http://www.tuxyturvy.com/files/compiz-fusion if you want to give them a spin.  The SRPMS are almost complete ripoffs from a German Linux distribution called CCux that I know practically nothing about but that had SRPMS that seemed to be in pretty good shape.  Other than a few tweaks to revert to Python 2.4, disable KDE4 support and reenable KDE3, and a few dependency issues because of minor differences in package names, they compiled fairly easily.  They loaded on my laptop and it seemed to work.

There is at least one known issue that I noticed, the category icons in the CompizConfig manager don't seem to show up.  This looks like a code problem and not a package problem but it's only a cosmetic issue in the Config tool and not really a big deal so I didn't spend a lot of time on it.

I also had to pull in another few packages from Fedora, mainly xcb support.  The packages here are basically straight rebuilds of the Fedora 8 versions of those packages.

Now I could have installed a recent community distro like Fedora or Ubuntu where Compiz Fusion packages seem to be readily available -- I've used Fedora in the past and have given Ubuntu a spin -- but find myself getting frustrated with the high rate of updates and the occasional breakage that they introduce.  I've been quite happy with my slow moving, but very stable CentOS 5 distro.  It has all the applications I need and is rock solid on my hardware (a Dell D820 laptop).  If I decide I hate Compiz Fusion I wanted it to be as easy as possible to remove it completely and revert to my previous setup.

At first I just downloaded the Compiz Fusion 0.5.2 tarball and tried to compile and install it in /usr/local.  This actually seemed OK at first but after install I couldn't get the Compiz Config Tool to run.  I eventually fixed that with some symbolic links but it just felt like a sloppy install and I didn't like it.

I noticed that the Compiz Fusion Wiki had links to Fedora 7 RPM's from KageSenshi's Compiz Fusion repository so I decided to try rebuilding those.  To do that I also had to update a few core packages which I brought in from Fedora 7 (metacity 2.18 and newer versions of autoconf and automake probably only required to build from source) and pull a couple of packages from Fedora Core 6 (dbus-qt and fuse-libs).

After those upgrades it was pretty easy to compile most of the Fedora 7 RPMS for CentOS 5.  The exception was the compiz-plugins-main and compiz-plugins-extra packages.  Those packages are failing to compile with the same errors as documented here.  If someone knows how to fix this I'd love to hear about it.  For now I'm just using the binary packages directly from the Fedora 7 packages as they seem to work OK.

I found a solution to the compile failures for the compiz-plugin RPMS.  I was getting errors similar to the following:


opacify_options.c: In function 'opacifyOptionsSetScreenOption':
opacify_options.c:353: error: duplicate case value
opacify_options.c:345: error: previously used here


This appears to be a bug in the libxslt code.  I rebuilt the libxml2 and libxslt packages from Fedora 7 and upgraded them on my CentOS 5 system.  After that the compiz-plugin source RPMS compiled without issue.  You won't need these upgraded packages to run Compiz Fusion, but if you want to rebuild from source I've provided them in the buildtool-updates directory.

Installing the RPMS was easy and after the install I simply selected System Tools...Compiz Fusion Icon which gave me a nice icon in my taskbar where I can enable and disable Compiz and Emerald, as well as access their settings.  So far this package has run very stable on my system although I did have to select the "Indirect Rendering" option to work around the well known Nvidia bug which causes some windows to be solid black.  The plugins all seem to function as expected and I'm starting to see that there really are actual benefits to Compiz.  I've found the Scale, Expose, and Zoom features to be especially useful.

If you want to try Compiz Fusion on your CentOS 5 (or RHEL5) system you can download my binary RPMS (SRPMS are there as well if you want to rebuild yourself).  These RPMS are completely unsupported.  Feel free to drop me a note if they work for you, or if they don't, but I can't promise I can help as I have limited time.  If they completely break your system then you should know how to put it back together.  The fuse-libs RPMS are directly from Fedora Core 6 Extras.  Many thanks to KageSenshi for providing good source packages for FC7 that were easy to rebuild.  To install you can either just install all of the RPMS or be more selective by following the instructions on KageSenshi's website.

If you decide to uninstall you can run the following command:


rpm -e intltool fusion-icon-all fusion-icon-qt fusion-icon-gtk fusion-icon emerald-themes emerald libcompizconfig compizconfig-python ccsm fuse-libs compiz compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-fusion-plugins-unsupported compiz-gnome dbus-qt compiz-kde compiz-all compiz-bcop


Because the metacity package in this directory will replace the stock metacity package from CentOS5/RHEL5 if you want to revert completely to stock packages you'll need for force a downgrade back to the metacity 2.16 release.  The easiest thing to do is to simply run the following commands:


rpm -e --nodeps metacity;yum install metacity


This basically forces a uninstall of metacity and then downloads and installs the distro version of metacity.

Good Luck!!

在CentOS 5中安装Compiz Fusion 0.7.2

我对为Linux桌面提供视觉享受的项目真的十分感兴趣。但是,我几乎找不到一款桌面程序,通过旋转方块或晃动窗口达到实用效果。然而,在我们本地Linux用户组的会面中(ColaLUG -- 顺便访问一下如果你也在南卡罗来纳州,哥伦比亚地区),与会的一个同学提到在最近的Beryl和Compiz Fusion版本中,真正拥有了提高桌面生产力的特性。比如像窗口缩放、任务切换等等。我决定试试。

(2008 3月20日更新)

更新 -- 为了适应大家的要求,我发布了Compiz Fusion 0.7.2的更新包。这些包正在轻微的测试,但是如果你想运行他,你可以在http://www.tuxyturvy.com/files/compiz-fusion 下载。SRPMS包基本上全是从一个叫CCux的德国发行版盗取过来的,我对这个发行版几乎一无所知,但是这些SRPMS包看起来相当不错。除去一些对 Python 2.4的支持,没有KDE4支持和使用KDE3,以及一些源于镜像打包名不同而产生的依赖问题,这些包编译起来还是相对容易的。他们可以安装在我的笔记本 看起来还能工作。

现在至少有一个已知问题, CompizConfig manager里的分类图标好像没有显示出来。这看起来像是代码错误而不是包的问题,但是这只是配置工具里的一个次要问题,并没什么了不起的,所以我没有花时间去对付它。

我也加入了一些从Fedora来的包,大多数是关于xcb支持的。这些包基本都是直接为Fedora 8编译的。

现 在,我可以安装一个最新的社区发行版比如Fedora或Ubuntu,这样Compiz Fusion看起来就是一件很容易的事了 -- 我曾经用过Fedora,也玩过Ubuntu -- 但是我发现自己被它们过高的更新率和由此引起的偶尔崩溃搞得十分沮丧。而对于更新缓慢,但是非常稳定的CentOS 5却非常满意。它有我需要的所有应用程序,并且在我的硬件(Dell D820本本)上坚如盤石。如果我感到非常憎恨Compiz Fusion,我想要尽可能容易的完全先移除它,可以回复到最初的安装。

最初我只是下载Compiz Fusion 0.5.2源码包试图把它编译安装到/usr/local。开始编译看起来不错,但是安装完成后Compiz Fusion工具无法运行。最终我还是通过一些符号链接搞定了它,但是这看起来像一个很不干净的安装,我不喜欢它。

我发现Compiz Fusion Wiki上有一个链到KageSenshi's Compiz Fusion repository上 的Fedora 7 RPM包仓库,所以我决定重新编译这些包。为了编译我也不得不更新一 些从Fedora 7拿来的核心包(metacity 2.18和大概只是从源码编译要求的新版本的autoconf、automake),还有一些包是从Fedora Core 6拉来的(dbus-qt and fuse-libs)。

在这些升级过后,把Fedora 7包编译到CentOS 5就非常容易了。例外的是compiz-plugins-main和compiz-plugins-extra这两个包。它们由于同样的原因无法编译,就像这里说的一样。如果谁知道怎么解决它,我很想听一下。就现在来说,我只是直接使用Fedora 7的二进制包,因为看起来它们工作得不错。

我发现了compiz-plugin包编译失败的解决方法。以前的错误如下:

opacify_options.c: In function 'opacifyOptionsSetScreenOption':
opacify_options.c:353: error: duplicate case value
opacify_options.c:345: error: previously used here
这 看起来是libxslt代码的错误。我重新编译了从Fedora 7抓来的libxml2和libxslt包,然后在我的CentOS系统上升级。这样compiz-plugin源RPM包就无错编译成功。运行 Compiz Fusion你并不需要升级这些包,但是如果你想从源包重新编译,我把它们放在buildtool-updates文件夹下,可以去那找到它们。

安装RPM包真是太容易了,安装完成后简单的选择 应用程序...系统工具...
Compiz Fusion Icon,马上在任务栏出现一个美丽的图标,点击它可以打开和关闭Compiz、Emerald,同样也可以设置。到现在为止这些包在我的系统上工作得很稳定,虽然我不得不选上“Indirect Rendering”这个选项,以防著名的Nvidia bug把一些窗口变成一垞黑。插件如预期那样起作用了,我开始注意到,Compiz还真正地有一些实际用处。我发现Scale、Expose和Zoom尤其有用。

如果你想在你的CentOS 5 (或 RHEL5)系统上尝试Compiz Fusion,你可以下载我的二进制RPM包(SRPM包也在那,如果你想自己重新编译)。这些RPM包完全没有支持。如果它在你那也正常运行,不要客气给我发个信;或者它没有正常工作,我不能保证我能帮助你,因为牛仔很忙。如果它完全破坏了你的系统,你应该知道怎么把这些包完全卸载。fuse-libs RPM包是直接从FC6 Extras仓库拿来的。多多感谢KageSenshi提供质量优良的FC7源包,它们非常容易重新编译。安装时你既可以只安装我提供的所有RPM包,也可以更有选择的按照KageSenshi网站上的说明去做。
如果你决定卸载Compiz Fusion,运行如下命令:
rpm -e intltool fusion-icon-all fusion-icon-qt fusion-icon-gtk fusion-icon emerald-themes emerald libcompizconfig compizconfig-python ccsm fuse-libs compiz compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-fusion-plugins-unsupported compiz-gnome dbus-qt compiz-kde compiz-all compiz-bcop
因为这里的metacity包会覆盖CentOS5/RHEL5里原始的metacity包,如果你想完全回复以前的包,你需要强制降级回metacity 2.16。要做到这件事最简单的方法是运行以下命令:
rpm -e --nodeps metacity;yum install metacity
这样它会强制卸载metacity,然后下载并安装metacity的发行版原始包。
祝你好运!!

阅读
发现
翻译