LinuxSir.Org  
| 网站首页 | 注册账号 | 论坛帮助 |

欢迎来到LinuxSir.Org!
您还未登录,请登录后查看论坛,或者点击论坛上方的注册链接注册新账号。


发表新主题 回复
 
主题工具
旧 06-02-23, 12:08 第 1 帖
yongjian
 
yongjian 的头像
 
 
★版☆主★  
  注册日期: May 2003
  我的住址: Linux
  帖子: 2,572
  精华: 9
 

标题: 配置XGL - 实现如OSX般的超酷桌面


配置XGL - 实现如OSX般的超酷桌面

时下,Linux社区最热门的话题之一莫过于对XGL和AIGLX的讨论和实现。XGL出自于Novell,完全基于OpenGL绘图引擎,通过利用nvidia/ATI显卡优良的硬件加速通道实现可用的2D/ 3D桌面。XGL可以说是新一代的建立在OpenGL基础上的X server。由于充分利用了显卡的GPU,运行速度相当的快。没有出现好看不好用的情况。个人觉得值得期待。AIGLX是RedHat/ Fedora项目下的一个增强目前X服务器显示效能的子项目,也是利用OpenGL的绘图引擎,但主要是在现有的X架构下进行扩展和对Mesa增加patch.动作不如Novell大。不过由于强调了将尽量依赖open source的driver, 很多人也看好。

官方网站:
XGL:http://en.opensuse.org/Xgl
AIGLX: http://fedoraproject.org/wiki/RenderingProject/aiglx

参考文献:
http://www.ubuntuforums.org/showthread.php?t=131267
http://www.ubuntuforums.org/showthread.php?t=131253
http://www.ubuntuforums.org/showthread.php?t=134657
http://ubuntuforums.org/showthread.php?t=132063


大致的介绍了一下后,现在看看如何在ubuntu Dapper下配置实现XGL。(Breezy没有试过,但应该也是可行的。) 声明一下的是目前这些技术都还处在开发阶段(尽管本人觉得已经相当的稳定了),但还是有可能造成系统不稳定。如果你出现了问题,可以到这里讨论。还有就是由于XGL是基于OpenGL绘图引擎的,所以你必须有nVIDIA或ATI显卡(如果有人能在非这两种卡的情况下配置成功,请告知,我会将这段修改)。nVIDIA的基本要在Geforce2以上,ATI在r200以上。因为看到网上很多人都报怨现行的驱动已经不支持很旧显卡了。使用nv驱动的肯定不行。(我在nvidia的TNT2上用nv的驱动试了,不行)还有本文主要针对nVidia显卡,因为我没有ATI卡,所以也无法尝试。

1. 确保你打开了sources.list中的universe和multiverse源。怎么打开我就不多讲了。
2. 确保升级到最新的nvidia驱动.
代码:
apt-get update && apt-get install linux-restricted-modules-$(uname -r) nvidia-glx nvidia-glx-dev nvidia-kernel-common
3. 完成之后,我们开始配置xorg.conf.首先做个备份,以免出错后无法回复。
代码:
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig
。现在开始配置。看到"Module"的部分,将"Load "dri""注释掉。然后加上"Load "glx"".完成之后象这样:
代码:
Load "glx" # Load "dri"
.其他的不用修改。然后看到"Device"部分。参照下面的配置改:
代码:
Section "Device" Identifier "NVIDIA Corporation NV17 [GeForce4 420 Go 32M]" Driver "nvidia" Option "NvAGP" "1" Option "NoLogo" "true" Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true" Option "CursorShadow" "1" EndSection
"Identifier不要照抄我的,你的显卡是什么型号就是什么。Driver一定要将"nv"改为"nvidia". Option "NvAGP" "1"表示用agpgart模块。如果你是PCIE显卡,不用这个。option "NoLogo" "true"表示不显示nvidia的logo. option "RenderAccel" "true"表示打开显卡的硬件加速。option "AllowGLXWithComposite" "true"表示利用OpenGL来进行图形的合成渲染。最后option "CursorShadow" "1"表示显示鼠标阴影。(这是我原来有的,和XGL没什么关系,加不加无所谓。)好了,如果你已经完成,那么xorg.conf的部分就完成。Save你的xorg.conf文件。
4. 重启X或是重启电脑,保证所有的driver和modules都能正常的加载。如果你发现X起不来了,那么你基本上可以在这停下了。恢复原来你备份的xorg. conf然后看看到底是怎么回事。如果你的X还能起,那么,请继续。
5. 这一步我们安装全新的XGL服务器和图形合成管理器。同样,必须打开universe和multiverse源。
代码:
apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz- gnome
6. 完成了之后,我们来配置gdm.
代码:
vi /etc/gdm/gdm.conf-custom
将下面的配置文件完全照抄
代码:
# GDM Configuration Customization file. # # This file is the appropriate place for specifying your customizations to the # GDM configuration. If you run gdmsetup, it will automatically edit this # file for you and will cause the daemon and any running GDM GUI programs to # automatically update with the new configuration. Not all configuration # options are supported by gdmsetup, so to modify some values it may be # necessary to modify this file directly by hand. # # To hand-edit this file, simply add or modify the key=value combination in # the appropriate section in the template below. Refer to the comments in the # gdm.conf file for information about each option. Also refer to the reference # documentation. # # If you hand edit a GDM configuration file, you should run the following # command to get the GDM daemon to notice the change. Any running GDM GUI # programs will also be notified to update with the new configuration. # # gdmflexiserver --command="UPDATE_CONFIG <configuration key>" # # For example, the "Enable" key in the "[debug]" section would be specified by # "debug/Enable". # # You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and # re-read the new configuration settings. You can also restart GDM by sending # a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes # any user session started by GDM to exit immediately while USR1 behaves like # gdm-safe-restart and will wait until all users log out before restarting GDM. # # For full reference documentation see the gnome help browser under # GNOME|System category. You can also find the docs in HTML form on # http://www.gnome.org/projects/gdm/ # # NOTE: Lines that begin with "#" are considered comments. # # Have fun! [daemon] [security] [xdmcp] [gui] [greeter] [chooser] [debug] [servers] 0=Xgl [server-Xgl] name=Xgl server command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo flexible=true
注意:上面这个配置只能用于nVIDIA显卡.如果你是ATI显卡,将[server]以下的内容改成
代码:
[servers] 1=Xgl [server-Xgl] name=Xgl server command=/usr/bin/Xgl :1 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo flexible=true
然后,你还要将gdm.conf中
代码:
0=Standard #1=Standard
改成:
代码:
#0=Standard 1=Standard
这样gdm将缺省用显示屏幕1而不是0. 还有上面gdm的配置文件都是老外写的,我只是拿来用。
7. 现在来配置OpenGL composite manager,这个将取代metacity来渲染和设定窗口的行为。值得注意的是在metacity下设定的快捷键都将没有用了。
代码:
sudo vi /usr/bin/start_compiz #!/bin/bash gnome-window-decorator & compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place menu switcher opacity &
这个script也是抄的。
代码:
sudo chmod 755 /usr/bin/start_compiz
opacity这个plugin并没有安装。我们要到这里下载。然后
代码:
sudo tar xvfz /path/to/your/compiz_opacity.tar.gz -C /usr/lib/compiz/
8.好了,基本上都完成了。你可以重启机器或X来起动XGL,然后在terminal下输入
代码:
start_compiz
如果你看到你的窗口被重新绘制了,恭喜,你已经用上了目前最炫的Linux 3D桌面。如果你想看看有多酷,试试下面的Hotkeys: (这些Hotkeys都可以在gconf-editor->apps->compiz->plugins->... 的各个plugin中查看和修改。我列的这些都是缺省值)想看看OSX的窗口排列吗:F12
Vista样式的窗口切换<Alt><Tab>
立方体桌面切换<Control><Alt>+left/right key
立方体切换并保持当前窗口<Shift><Control><Alt>+left/right key
想看看透明窗口吗:<Shift><Control>+scrollmouse
想看看放大缩小吗:<Shift><Alt>+scrollmouse
...酷吧。Have fun ...
顺便附张小图。
上传的图像
文件类型: jpg Screenshot3.jpg (88.7 KB, 1707 次查看)







__________________
15" C2D MBP.
有简单的,不用复杂的!看到复杂的,尽量简单化!
Unix/Linux Philosophy: Be small! Be concentrated! One program does one thing and do it perfectly!
∞ years - 宇宙中最后的物质 Proton heat death. 之后,宇宙将以纯能量的形式永远存在。。。一切皆空

此帖于 06-02-23 12:12 被 yongjian 编辑.
  yongjian 当前离线   回复时引用此帖
旧 06-02-23, 22:19 第 2 帖
Rage
 
 
 
注册会员  
  注册日期: Jun 2003
  帖子: 19
  精华: 0
 

收藏了,搞搞试试看
  Rage 当前离线   回复时引用此帖
旧 06-02-23, 22:59 第 3 帖
Linux_Lyb
 
Linux_Lyb 的头像
 
 
注册会员  
  注册日期: Jul 2003
  我的住址: 兴宁<->广州
  帖子: 519
  精华: 2
 

早就装好了,不过兄弟才这么有心写出教程来。谢谢!







__________________
欢迎一起讨论linux下的游戏 www.happygame.org
  Linux_Lyb 当前离线   回复时引用此帖
旧 06-02-23, 23:11 第 4 帖
yongjian
 
yongjian 的头像
 
 
★版☆主★  
  注册日期: May 2003
  我的住址: Linux
  帖子: 2,572
  精华: 9
 

我在用fcitx输入时xgl会crash,不知其他人有没有这样的情况。特别是按住shift键输入英文时。
  yongjian 当前离线   回复时引用此帖
旧 06-02-23, 23:50 第 5 帖
ctqucl 帅哥
 
ctqucl 的头像
 
 
注册会员  
  注册日期: Nov 2004
  我的住址: 二樓
  帖子: 525
  精华: 0
 

谁发个a卡的啊,我一装就花屏的不行.







__________________
东逛西晃,不学无术。
  ctqucl 当前离线   回复时引用此帖
旧 06-02-24, 08:22 第 6 帖
yvdu
 
 
 
注册会员  
  注册日期: Jul 2005
  帖子: 25
  精华: 0
 

标题: INTEL 的集成显卡GMA900可不可以啊


INTEL 的集成显卡GMA900可不可以啊
  yvdu 当前离线   回复时引用此帖
旧 06-02-24, 08:47 第 7 帖
Florentina
 
 
 
注册会员  
  注册日期: Feb 2006
  帖子: 8
  精华: 0
 

强烈要求发a卡的
  Florentina 当前离线   回复时引用此帖
旧 06-02-24, 10:30 第 8 帖
seamonkey
 
 
 
注册会员  
  注册日期: May 2004
  帖子: 2,746
  精华: 1
 

很眩目,但我的GeForce2 MX/MX 400估计够呛。
  seamonkey 当前离线   回复时引用此帖
旧 06-02-24, 11:59 第 9 帖
ctqucl 帅哥
 
ctqucl 的头像
 
 
注册会员  
  注册日期: Nov 2004
  我的住址: 二樓
  帖子: 525
  精华: 0
 

发A卡啊,我这里别说3d了,一装2d都不行了。
  ctqucl 当前离线   回复时引用此帖
旧 06-02-24, 14:26 第 10 帖
lpknnkh
 
 
 
注册会员  
  注册日期: Dec 2004
  帖子: 173
  精华: 0
 

我的出现Failed to load shadow images
compiz.real:No composition extention
我的是ATI 9500 Pro显卡,AMD AthlonXP CPU
  lpknnkh 当前离线   回复时引用此帖
旧 06-02-24, 16:27 第 11 帖
KenShinXF 帅哥
 
KenShinXF 的头像
 
 
注册会员  
  注册日期: Nov 2005
  我的住址: 天津
  帖子: 561
  精华: 0
 

我的是ati9100igp的卡
装上了
不过就是不很流畅
凑合着能用阿
就是glxgears的时候系统crash还有就是glxinfo | grep direct 显士no
怎么能打开3d驱动呢?







__________________
Lead A Simple Life!
Blog:
kenshinxf.blogspot.com
  KenShinXF 当前离线   回复时引用此帖
旧 06-02-24, 21:21 第 12 帖
jaex
 
 
 
注册会员  
  注册日期: Feb 2006
  帖子: 30
  精华: 0
 

标题: 这是为gnome写的马?


kde也可以直接用吗?
  jaex 当前离线   回复时引用此帖
旧 06-02-24, 23:26 第 13 帖
yongjian
 
yongjian 的头像
 
 
★版☆主★  
  注册日期: May 2003
  我的住址: Linux
  帖子: 2,572
  精华: 9
 

kde应该也可以用,因为它并不是只给gnome写的,而是底层的X引擎。只是目前只有针对gnome的compiz manager,从而可以简单的与gconf配合。我想以后一定会有针对kde的。

此帖于 06-02-24 23:34 被 yongjian 编辑.
  yongjian 当前离线   回复时引用此帖
旧 06-02-24, 23:31 第 14 帖
yongjian
 
yongjian 的头像
 
 
★版☆主★  
  注册日期: May 2003
  我的住址: Linux
  帖子: 2,572
  精华: 9
 

引用:
作者: lpknnkh
我的出现Failed to load shadow images
compiz.real:No composition extention
我的是ATI 9500 Pro显卡,AMD AthlonXP CPU
试试在你的xorg.conf里再加上这个
代码:
Section "Extensions" Option "Composite" "Enable" EndSection
  yongjian 当前离线   回复时引用此帖
旧 06-02-26, 21:24 第 15 帖
WWWork
 
 
 
注册会员  
  注册日期: May 2005
  帖子: 10
  精华: 0
 

加了universe和 multiverse,还是提示找不到compiz
谁共享个有compiz的源阿,3x
  WWWork 当前离线   回复时引用此帖
发表新主题 回复


主题工具

发帖规则
您 [不可以] 发表新主题
您 [不可以] 回复主题
您 [不可以] 上传附件
您 [不可以] 编辑您的帖子

已 [启用] BB 代码
已 [启用] 表情符号
已 [启用] IMG 代码
已 [禁用] HTML 代码
[论坛跳转…]


所有时间均为[北京时间]。现在的时间是 21:17


Powered by vBulletin 版本 3.6.8
版权所有 ©2000 - 2010, Jelsoft Enterprises Ltd.
官方中文技术支持: vBulletin 中文
版权所有 ©2002 - 2009, LinuxSir.Org