Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101972190
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-09 20:55:18

 




In order to run compiz, you will likely want to set up Xgl or AIGLX first. Please make sure you have already installed Xgl or AIGLX. For more, consult the CompositeManager page.

为了运行compiz,你应该首先安装Xgl或者是AIGLX。因此,请确定你已经安装了Xgl或者AIGLX。更加详细的信息请咨询CompositeManager页面。CompositeManager

 Setting up(设置软件库)

Make sure that you have the proper repositories configured. You need the Universe and Multiverse repositories as well as either one of the following two non-Ubuntu repositories:

首先,确认你已经正确配置了软件库。你需要 Universe 和 Multiverse 软件库,你也可以使用下面提供的两个非 Ubuntu 软件库的其中任何一个。

deb  dapper main
deb  dapper main

If you need help with adding repositories, please see .

如果你在添加软件库方面需要帮助,请参看 。

The packages in Quinn's can be gpg authenticated. If you want to be able to check the packages against QuinnStorm's , import her key by typing the following command in a terminal:

在Quinn的compiz软件库当中的软件包都能获得了gpg的认证。如果你想检查这些软件包中与QuinnStorm匹配的gpg签名,可以在终端中键入如下的命令,用来导入QuinnStorm的密钥。

gpg --keyserver subkeys.pgp.net --recv-keys 0x31a5f97fed8a569e
gpg --export --armor 0x31a5f97fed8a569e | sudo apt-key add -

If you do not import the gpg key, you will receive an error message "The integrity of the packages cannot be verified".

如果你不导入这个pgp密钥,你将会收到一个错误信息:“The integrity of the packages cannot be verified” 。

(./) For more on secure apt, see Secure Apt on the Debian wiki.

关于安全apt(secure apt)方面的更进一步的信息,请参看Debian wiki中Secure Apt 这一章。

Now update the package list and do a dist-upgrade to make sure we get the latest mesa packages and such:

现在,你可以升级你的软件包列表了;在apt-get 命令当中使用dist-upgrade 参数就可以取得最新的mesa软件包了。 下面就是使用dist-upgrade操作的例子:

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Update-Manager will now inform you about updates to the compiz repositories.

升级管理器可以通知你关于compiz软件库的升级信息。


 Optionally: CVS repository(可选:CVS软件库)

QuinnStorm

QuinnStorm provides access to the CVS repository for those who wish to have the absolute latest code.

如果你想得到完全最新源代码,QuinnStorm 也提供对CVS软件库的访问。

cvs -d:pserver:anonymous@metascape.afraid.org:/cvsroot login
password: ''leave blank''
cvs -d:pserver:anonymous@metascape.afraid.org:/cvsroot co compiz

(./) A web-view of the CVS can be found .

一个通过网页访问的CVS可以点击。

 Selecting the packages(选择软件包)

The packages we need are compiz and compiz-gnome or compiz-kde (actually there are more packages but these two take care of all the dependencies). gset-compiz is a nifty front-end for setting general compiz preferencs as well as the numerous parameters of the compiz plugins.

我们需要的 compiz 软件包是 compiz-gnomecompiz-kde (实际上,这里有很多这样的软件包,但是这两个是所有软件包所必需的关联软件包)。gset-compiz 是一个灵活的通用的参数设置前端程序,它同样能够很好的设置 compiz 插件中众多的参数。

A suggested install of compiz would include the following packages:

下面是 compiz 的一个包含着两个软件包的推荐安装。

compiz
compiz-gnome
gset-compiz

(!) There is no package gset-compiz (for dapper amd64)

(!)没有为dapper amd64专门开发的gset-compiz软件包。

(!) Are the KDE packages ready? KDE users, let others know about your preferred packages.

(!)在KDE下工作的软件包发布了么? KDE的用户,如果你们知道请告诉别人你最满意的软件包的信息 ;-)

 Getting Compiz to Run(运行compiz)

How you get compiz to run depends upon your Xgl or AIGLX setup. Methods A and C are Gnome-specific; method B is not. KDE users may note that some parts do say gnome, do not fret, it still works. Currently the compiz-kde package is trash and doesn't work, but compiz-gnome works with KDE. gnome-window-decorator also works with KDE.

compiz运行的程度依赖于你先前对Xgl或者AIGLX的安装。 方法A和C是为Gnome定制的,方法B则不是。 KDE的用户们可能会注意到有些部分只提到Gnome下情况,不用着急,它们在KDE下的情况是一样的;-) 。 现在的compiz-kde软件包会经常性的崩溃而不能够工作,但是compiz-gnome却能够很好的在KDE环境下工作;可能是gnome-window-decorator在KDE下也能够运行的原因吧。

 Method A: Session (GNOME)(方式A:使用会话(GNOME))

(!) This procedure assumes that you have logged into your Xgl server session and that you have installed the compiz-gnome package and its dependencies as discussed above.

(!)这个进程假设你已经登录到了你的Xgl服务器会话中了。同时,你也已经像我们前面讨论的那样安装了compiz-gnome软件包。

First, we'll start up gnome-window-decorator, which compiz needs for drawing the title bars of windows etc. Open a terminal and type

首先,我们将启动gnome-window-decorator;这是一个compiz用来绘制窗口标题栏等等的组件。打开终端键入:

gnome-window-decorator &

When you run compiz for the first time, type the following into a terminal:

当你第一次运行compiz的时候,在终端中键入如下的命令:

compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher trailfocus water bs neg &

You can then start compiz at the beginning of each Xgl server session by placing two commands in your session file. Navigate to "System > Preference > Sessions". Click on the right-most tab, "Startup Programs".

然後,你可以在么个Xgl服务器会话的开始阶段启动compiz了;通常你的会话文件中可以放置两个命令。 可以通过遍历“ System > Preference > Sessions”,然後通过鼠标右键点击“Startup Programs ” 来设置。

  • attachment:gnome-session.png

Create a new entry for the window-decorator:

为windows-decorator创建一个新的条目:

gnome-window-decorator

Now create a new entry for compiz:

现在为compiz创建一个新的条目:

compiz --replace gconf

Close the Session Preference Panel. Now compiz should start every time you log into your Xgl-Gnome session.

关闭会话参数面板。现在compiz就可以在你每次登录进入Xgl-Gnome会话的时候启动了。


 Method B: Script(方式B:使用脚本)

(!) This procedure assumes that you have logged into your Xgl server session and that you have installed the compiz-gnome package and its dependencies as discussed above.

(!)这个进程假设你已经登录到了你的Xgl服务器会话中了。同时,你也已经像我们前面讨论的那样安装了compiz-gnome软件包。

Create a new script on your desktop:

为你的桌面建立一个新的脚本:

$ sudo gedit ~/Desktop/compiz

And paste this into it:

并且将脚本添加到这里:

#!/bin/bash
gnome-window-decorator &
compiz --replace gconf &
xmodmap /usr/share/xmodmap/xmodmap.us

(!) If your keyboard layout isn't English US, then change the last two letters in the line 'xmodmap /usr/share/xmodmap/xmodmap.??'. If you need US with deadkeys, then use '.us_intl'.)

(!)如果你的键盘布局不是美国英语的,你将需要在下面这一行中替换两个字母: 'xmodmap /usr/share/xmodmap/xmodmap.??' 。如果你需要美国键盘中的deadkey,你可以使用'.us_intl' 。

(!) Make sure xmodmap is installed. If not you will need to install it. Some users have noted /usr/share/xmodmap does not exist on their system, if so you must install gnome-applets-data.

(!)取定你已经安装了xmodmap。如果没有,你需要将它装上。 一些用户可能注意到 /usr/share/xmodmap在他们的系统当中并不存在,如果是这种情况,可以安装 gnome-applets-data来解决它。

Make your new script executable:

让你的新脚本变得可以运行:

sudo chmod +x ~/Desktop/compiz 

Now type

现在键入:

$ sudo /etc/init.d/gdm restart

to restart the gnome display manager. Now you can double-click "compiz" on the desktop to launch compiz.

重新启动gnome的显示管理器。现在你就可以在桌面上双击compiz来启动compiz了。


 Method C: Toggle(方法C:切换)

(!) This procedure assumes that you have logged into your Xgl server session and that you have installed the compiz-gnome package and its dependencies as discussed above.

(!)这个进程假设你已经登录到了你的Xgl服务器会话中了。同时,你也已经像我们前面讨论的那样安装了compiz-gnome软件包。

The following script allows you to toggle between metacity (Gnome's default window manager) and compiz from within your Xgl session:

在Xgl会话中应用下面的这个脚本,可以让你在matacity(Gnome的默认窗口管理器)和compiz之间切换:

sudo gedit /usr/local/bin/toggle-compiz.sh
#!/bin/bash
if ps -A | grep -e "compiz.real$" > /dev/null; then
killall gnome-window-decorator
metacity --replace &
else
gnome-window-decorator &
compiz --replace gconf &
fi

Make the script executable:

使你的脚本变得可以执行:

sudo chmod +x /usr/local/bin/toggle-compiz.sh 

Now you can create a desktop shortcut or a gnome panel launcher to easily toggle between compiz and metacity.

现在你就可以创建一个桌面快捷方式或者gnome的面板启动器,这样你就可以轻松的在compiz和metacity之间切换。

 Done! - Now what?(完工 - 现在做什么?)

阅读(720) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~