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

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-09 20:57:06

原文出处:

 

 



译者zsal注:我的英文并不好,也是这两天才接触Ubuntu,由于对Xgl很感兴趣,并终于配置成功,所以想为大家做点贡献。翻译的错误及疏漏请大家指正。

Xgl is alpha software so it isn't recommended that you install this software on a production machine. For Dual Monitor (or more) users: A lot of people are experiencing troubles when enabling Xgl. Especially for this group, be *very* careful with Xgl.

Xgl是正在测试中的软件,所以不推荐安装在实际运作的机器上。对于双显示器(或更多)的用户,很多人在开启了Xgl後遇到了麻烦。对于这些人,特别要小心!

This howto requires that you add two extra repositories to your apt sources.

  • For additional information visit the Compiz project site's wiki :

此安装方法需要添加两个额外的软件库到apt软件源。

  • 更多信息请登录Compiz项目网站的wiki :

 Introduction(介绍)

  • This page details how to install Xgl on your system.
  • 这篇文章介绍了如何把XGL安装到你的系统中。

 Prerequisites(先决条件)

  • You need a supported video card. (See list below.)
  • You need to have video card drivers with 3D acceleration installed. See on the Ubuntu Documentation for help with this.
  • 你需要一块支持XGL的显卡。(请看下面的列表)
  • 你需要安装支持3D加速的显卡驱动。请看Ubuntu文档 以获取帮助。

 Supported Hardware(支持的硬件)

  • ATI
    • Mobility Radeon 9700 SE: Xgl 需要闭源 fglrx 8.23 驱动
    • Radeon X300: Xgl 需要闭源 fglrx 8.23 驱动
  • NVIDIA
    • MX 4xxx 系列的显卡 或者更新的使用 NVIDIA binary 驱动的
  • Intel
    • i8xx 系列 或者 i9xx 系列
  • (./) For a more definitive list with user comments, see:
  • (./) 更多权威信息请看:

 Installation(安装)

 Setting up additional repositories( 添加软件库)

  • 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 Quinn'Storm's , import her key by typing the following commands in a terminal:

如果你不知道如何添加软件库,请看 。 Quinn的 中的包可以进行GPG认证。可以在终端敲入如下命令来导入并验证QuinnStorm的 [ gpg signature:

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

If you do not import the pgp key, you will receive an error message "The integrity of the packages cannot be verified". (./) For more on secure apt, see SecureApt on the Debian wiki. Now update the package list and do a dist-upgrade to make sure we get the latest mesa packages and such:

如果你没有导入GPG公匙,你会收到一个错误消息 "The integrity of the packages cannot be verified". (./) For more on secure apt, see SecureApt on the Debian wiki. 更新系统以保证我们获取最新的mesa包:

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

Installing Xgl packages(安装XGL包)

  • All you have to do is install the xserver-xgl package, it will take care of all the dependencies. See for help with this.
  • 你只需安装xserver-xgl包, 所有依赖包也将会一同安装. 请看 以获得帮助。

译者zsal注:可以参考下面的命令(译者uboat建议用新立德安装):

$ sudo apt-get install xserver-xgl

 Choose How Your Computer Will Start Xgl(选择如何运行Xgl)

  • There are multiple ways to run Xgl. You may first want to test everything works before making Xgl and compiz your default configuration. One way to do this is to run Xgl as part of your desktop session. Short of a hard lock, you can terminate that session to stop Xgl and continue using the regular X server. Method A below describes this route. Method B is about setting Xgl as the standard X server started by GDM, the Gnome Display Manager. This is basically system-wide deployment of Xgl rather than per user desktop session.
  • 有多种方法可以运行Xgl. 在把Xgl和compiz设为默认配置之前你首先应该测试所有的工作。一个方法是把Xgl作为会话来运行。只要没有死锁你就可以终止会话以结束Xgl,并继续使用正常的X服务。下面的方法A介绍这种途径。方法B是把Xgl设置为标准X服务,通过GDM来启动。This is basically system-wide deployment of Xgl rather than per user desktop session.
  • (!) KDE Users should use method A, GNOME users may choose either.
  • (!) KDE 和 XFCE 应该使用方法 A, GNOME 用户可以任意选择。

 Method A: Xgl Session on Login Window(方法A: 登录窗口的Xgl会话)

  • This will allow you to start Xgl as an option at the login screen. The Xgl server starts on DISPLAY :1 as part of your desktop session and terminates when you end your session. This is convenient route as you can simply select a regular session if Xgl doesn't work. Xorg continues running on DISPLAY :0 since it's needed by Xgl.
  • 这将允许你在启动画面选择是否启动Xgl。Xgl服务作为桌面会话的一部分在DISPLAY :1上启动,当你结束会话它也被终止。如果Xgl不工作,你会很方便地选择正常的会话。Xorg 继续运行在 DISPLAY :0 。
  • We will need to create two new files: a startup script and a X session file.
  • 我们需要创建两个新文件:一个启动脚本startxgl.sh 和X会话文件xgl.desktop。

Open up a terminal and create a new script named startxgl.sh:

在终端输入如下命令:

gksudo gedit /usr/bin/startxgl.sh

(!) Note that /usr/bin is the place where most of the system's binaries get installed; /usr/local/bin or ~/bin are usually regarded as better places for locally installed and administered software. If you decide to create your script in one of these places be aware that you may need to create the directories as well. Don't forget to change the script's location accordingly throughout the tutorial.

(!) 注意/usr/bin是大部分系统二进制文件安装的位置;/usr/local/bin~/bin 通常是更好的本地安装和管理软件的位置。如果你要在这些位置上创建你的脚本,最好创建一个目录。Don't forget to change the script's location accordingly throughout the tutorial.不要忘记相应地改变整个教程中脚本的位置

译者zsal加:在startxgl.sh文件中,根据你的显卡和系统输入相应的内容:

NVIDIA (using GNOME) #!/bin/bash
Xgl -fullscreen :1 -audit 0 -ac -br -accel glx:pbuffer -accel xv:fbo &
sleep 2 && DISPLAY=:1 gnome-session
NVIDIA (using KDE) #!/bin/bash
Xgl -fullscreen :1 -audit 0 -ac -br -accel glx:pbuffer -accel xv:fbo &
sleep 2 && DISPLAY=:1 startkde
ATI and Intel (using GNOME) #!/bin/bash
Xgl -fullscreen :1 -audit 0 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 2 && DISPLAY=:1 gnome-session
ATI and Intel (using KDE) #!/bin/bash
Xgl -fullscreen :1 -audit 0 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 2 && DISPLAY=:1 startkde
  • Save this file, and close the editor.
  • 保存文件,并结束编辑器。
  • Make the script executable with the following command:
  • 用如下命令使脚本可执行:
sudo chmod +x /usr/bin/startxgl.sh
  • Now we'll add an option to the gnome login manager so that we can choose to log into our new Xgl-gnome session. Create an Xsession file like so:
  • 现在我们为GNOME登陆管理器添加一个能选择Xgl会话的选项,创建文件方法如下:
gksudo gedit /usr/share/xsessions/xgl.desktop
  • In this file, paste the following:
  • 请把如下内容粘贴在此文件中:
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application
    • Save this file and close the editor.
    • 保存文件,并结束编辑器。

译者zsal注:也许你需要把“/usr/bin/compiz-start”(最新的Xgl提供这个启动脚本)添加到GNOME会话启动程序。方法是:“系统”,“首选项”,“会话”,选择第三个标签页“启动程序”,添加即可。

    • To log into Xgl, logout of your current session, and from the login screen click "Options" and "Session chooser".
    • 如果要登陆Xgl,先退出当前会话,在登陆画面点击“选项”和“会话”。
  • Select "Xgl" from the Session menu.
  • 选择"Xgl"。
  • When you login, gdm will ask if you would like to make the "Xgl" session the default session. For now, choose "Just for this session".
  • 登陆时,GDM会问是否把Xgl作为默认会话。现在,请选“只是这一次会话”。
  • (!) When your Xgl desktop appears for the first time, gnome may ask you about your keyboard localization preference. Choose "Use Gnome keyboard localization" to continue using your usual keyboard settings.
  • (!) 当你第一次登陆Xgl桌面,GNOME也许会问你键盘区域设置,选择"使用GNOME键盘区域"以继续使用你的键盘设置。

 Method B: Make Xgl Your Standard Display Server(方法B: 将Xgl作为您的标准显示服务端)

  • Another way to run Xgl involves replacing Xorg with Xgl as the standard X display server for use with GDM, the Gnome Display Manager. Xgl will take DISPLAY :0 and start Xorg on DISPLAY :93 since it's needed by Xgl. Switching between X servers will not be as simple as logging out and back in again though; it will require a little bit of file editing instead. We'll configure the gnome display manager. In the terminal type:
  • 另一个运行Xgl的方法需要用Xgl替代Xorg作为标准X显示服务端以配合GDM(Gnome显示管理器)的使用。当选择Xgl後,Xgl将占据 DISPLAY :0 而 Xorg将启动在 DISPLAY :93。X服务端之间的切换并不是简单的登出後再登录,它需要编辑一些文件。我们将要在终端方式下配置gnome显示管理器:
If you have NVIDIA(如果你使用的是NVIDIA的显卡)
  • Add a new [server-Xgl] section and change the [servers] section to look like this:
  • 添加一个新的[server-Xgl]区段,并改变[servers]区段内容,具体如下:
[servers]
0=Xgl
[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl -fullscreen -br -accel xv:fbo -accel glx:pbuffer
flexible=true

 If you have ATI(如果你是用ATI的显卡)
  • Add a new [server-Xgl] section and change the [servers] section to look like this:
  • 添加一个新的[server-Xgl]区段,并改变[servers]区段的内容,具体如下:
[servers]
0=Xgl
[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl -fullscreen -br -accel xv:pbuffer -accel glx:pbuffer
flexible=true

---

 Else(其他)
  • Add a new [server-Xgl] section and change the [servers] section to look like this:
  • 添加一个新的[server-Xgl]区段,并如改变[servers]区段的内容,具体如下:
[servers]
0=Xgl
[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl -fullscreen -br -accel xv:pbuffer -accel glx:pbuffer
flexible=true

---

(!) Xgl server takes a bit longer to start up than normal X server. If you are not able to reach the login screen and you notice that the Xgl server tries to start up multiple times before falling back to console login, you may try editing the file /etc/gdm/gdm.conf and changing the line GdmXserverTimeout=10 into GdmXserverTimeout=50 -- Battlehorse

(!) Xgl的启动要比通常的X花的时间长一些。如果你不能进入登录界面,并且发现在最终因失败而进入终端登录前Xgl曾多次尝试启动,这时候,你需要尝试编辑文件 /etc/gdm/gdm.conf 并把 GdmXserverTimeout=10 这一行改成 GdmXserverTimeout=50 -- Battlehorse

 Xgl 安装完成!

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