文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>xgl & compiz for fedora core 5

xgl & compiz for fedora core 5

时间:2006-09-19  来源:适兕

open suse 10.1安装xgl& compiz太简单了,以至于装上之后都没有什么感觉。详细安装过程见下面的连接:http://www.novell.com/coolsolutions/feature/17174.html。
于是,我就想到将我个人的电脑上所有的linux系统都装上3D体验!fedora core 5是第一步,ubuntu 6.10是第二步。
昨天晚上奋战了近6个小时,最后以失败告终,这却激起了我的兴趣!下面就将自己的安装过程写出来,算是知识的积累,也希望有心人能看到不用走不必要的弯路!
国内的资料少的可怜,仅有aaccdd兄在http://fedora.linuxsir.org上的一篇文章!并且详细介绍了aiglx及其安装步骤。
首先:我先引用一些关于xgl\compiz等的一些个概念:

⒈什么是Xgl?
http://www.freedesktop.org/wiki/Software_2fXgl
Xgl是基于OpenGL上的X服务架构,现在处于开发阶段,很多重要的部分还未完成。Xglx是目前唯一使用这种结构的X服务器,它需要在一个已有的X 服务器,只用于测试和开发目的。Xegl是基于Xgl架构的新一代X服务器,它将使用EGL扩展独立地运行在OpenGL上。

Xgl is a new Xserver architecture layered on top of OpenGL. Xgl can perform intricate graphical operations--such as rendering antialiased fonts--noticeably faster than other available Xservers that do not use OpenGL. The current implementation is Xglx but the future implementation of Xgl will be Xegl.

More important than speed alone, Xgl accelerates complex composite operations, making possible new stunning visual effects through on OpenGL-enhanced composition/window managers like Compiz. These visual effects have broad practical use, making Linux more accessible for the visually impaired, and creating a workspace that is easier to comprehend and navigate for less experienced users.

Xgl must be used in combination with a compositor/window manager to expose all of its capabilities. Compiz is the compositor utility that was developed in conjunction with Xgl.

It is possible that future graphics hardware will support only 3D operations, without any 2D core any more. For this reason, Xgl is an important advance for all operating systems that rely on the X.org graphical foundation.

它有哪些新的特性呢?

基于OpenGL的X层,使用混合桌面,开启通往新功能、新机会的大门。以下是一些可能出现的功能,其中一些现在已经实现。我们要破除基于OpenGL的X中看不中用的迷信。

①加倍窗口显示分辨率,应用程序可以用特定的分辨率渲染窗口,而与桌面的分辨率不同。想像一下梯度背景,这样的一个窗口或材质只有几个色素,却以1600x1200或更大的尺寸显示。

②快速、简单的屏幕旋转、翻转、摇动、放大。

③高级字体渲染,包括使用材质和分段程序的及时轮廓字体渲染。

④模拟硬件层面,历史悠久的工作站图形功能可以用材质混合实现

⑤全屏颜色处理,包括伽玛纠正、对比增强、模糊、加亮等等。

⑥同一屏幕上混合像素深度,经重定向,上层窗口可以具有不同的色深(8、16、24、32bpp)。例如:XTerms可以8bpp(只需32bpp图像所用texmem的1/4)创建,用颜色查找表显示(texel 查找分段程序);

⑦每窗口任意色图(texel查找分段程序);

⑧替代窗口色彩空间,“视频”窗口可以存储为YCbCr(比RGB小),使用材质硬件显示时实时转化为RGB;

⑨窗口图像压缩,使用S3TC材质压缩,将内容很少改动的窗口压缩,存储于根窗口的桌面背景就是一个最好的应用。此项技术有可能节省大量内存;

⑩使用OpenGL多实例表面为反锯齿X渲染提供新应用。

⒉什么是Compiz?

Compiz带来多种视觉效果,使得Linux桌面变得更方便、功能更强大、更新颖、更容易满足用户的特殊需求。Compiz使用OpenGL进行 渲染,集窗口管理器与混合管理器于一身;窗口管理器处理屏幕上的应用程序和对话框,而混合管理器则使窗口和图形混合,产生混合图像;Compiz同时具有 两者的功能,产生惊人的效果。

Compiz目前只能与Xgl“共事”,Compiz的插件及窗口装饰器在Gnome和KDE下都能工作。

Compiz brings to life a variety of visual effects that make the Linux desktop easier to use, more powerful and intuitive, and more accessible for users with special needs.
Compiz combines together a window manager and a composite manager using OpenGL for rendering. A "window manager" allows the manipulation of the multiple applications and dialog windows that are presented on the screen. A "composite manager" allows windows and other graphics to be combined together to create composite images. Compiz achieves its stunning effects by doing both of these functions.

Compiz currently only works in combination with Xgl. Please see that wiki page for general installation instructions. (Compiz is now working under AIGLX as well.)

Compiz plugins as well as window-decorator works with Gnome as well as KDE.

⒊什么是aiglx?
http://fedoraproject.org/wiki/RenderingProject/aiglx?highlight=%28aiglx%29

Aiglx(Accelerated Indirect GL X)是一个旨在为标准桌面启用GL加速功能的项目,目的在于通过小幅度修改X server、使用添加新协议支持的Mesa升级版和带有混合管理器版本的metacity,让用户稍作改动即可在桌面上使用GL效果,随意开启、关闭该 功能而无需替代使用中的X server。

AIGLX is a project that aims to enable GL-accelerated effects on a standard desktop. We have a lightly modified X server (that includes a couple of extensions), an updated Mesa package that adds some new protocol support and a version of metacity with a composite manager. The end result is that you can use GL effects on your desktop with very few changes, the ability to turn it on and off at will, and you don't have to replace your X server in the process.

代码是与X 社区相关的上游完成,Fedora Core 5是第一个包括了模块X包和在适合位置添加适合协议的发布版。Aiglx在X基础方面已经进行了大量工作,但对实际的渲染效果并没下太大力气,希望广大社 区帮助创造有趣、适当的效果。重要的不是此时就推出成品,而是鼓励社区围绕其进行开发和实验。

然后,开始安装驱动,我被open suse误导了一下,去www.nvidia.com下了x86的最新驱动,但是安装失败,因为需要一个patch,这是http://www.nvnews.net/上的建议:


# sh /path/to/NVIDIA-Linux-x86-1.0-8178-pkg1.run --extract-only
# cd NVIDIA-Linux-x86-1.0-8178-pkg1
# patch -p0 < /path/to/NVIDIA_kernel-1.0-8178-U012206.diff.txt
# ./nvidia-installer -n

不过也让我见识了一下kernel-source xxx.rpm的安装!但是对rpmbuilder并没有做什么。换了fedora project 上建议的使用方法:

#yum install kmod-nvidia

Fix SELinux so the driver will work:

#setsebool -P allow_execmod=1

Shut down X:
init 3

Log in as root.Enable the driver:
#nvidia-config-display enable
Restart X:
#init 5
此时,大功告成!但是我此时想发的牢骚是:诺大一个中国,竟没有mirror,yum服务器,悲哀吧,想着ubuntu sources.list在国内的大部分都是台湾的我就悲哀!yum  一个22M的,静花去我4个多小时的时间!
接着开始安装Xgl compiz以及他们所依赖的。从以下站点下载:
http://www.auroralinux.org/people/spot/Xgl-FC5T3/
然后rpm -ivh xxx
在此我遇到的问题是control-center\mesa没有系统自带的新,所有没有安装成功。
添加下列代码

[servers]
0=Xgl

[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl -accel glx:pbuffer -accel xv -audit 0
chooser=false
handled=true
flexible=true
priority=0

到/etc/gdm/custom.conf
#gdmsetup
配置X服务器,将xgl替换掉standard.

在 gnome system (首选项)preferences ->(会话) sessions 中,在启动程序项添加:
compiz --replace gconf &;gnome-window-decorator &

重新启动 gdm ,比如 /usr/sbin/gdm-restart

但是我只走到这步,一如既往!!!并没有成功,Xgl和compiz都不能工作。下面是一位网友能够继续操作的步骤。希望我今天晚上可以搞定!
(it should start the Xgl server and compiz will take over as the composite/window manager.
there will be no window decorations at the first try, this will get better with step

  start gconf-editor and navigate to apps/compiz/general/allscreens/options and add the effect plugins
to "active_plugins".
add: decoration wobbly fade minimize cube rotate zoom scale move resize place switcher
(one at a time by clicking the add button)
after adding all of them it should read
active_plugins [gconf,decoration,wobbly,fade,minimize,cube,rotate,zoom,scale,move,resize,place,switcher])

续:
    终于搞定了!是compiz的版本问题,以及几个工具的使用问题!
下面介绍我继续的过程,其实相对于上面的,这几个步骤就简单多了!开始是由yum执行安装的:
1、安装yum源,
rpm -Uvh http://fedoraxgl.tuxfamily.org/repository/fedora-xgl-repository-1.0-3.noarch.rpm
2、然后去/etc/yum.repos.d/fedora-xgl.repo 修改GPGkey为false,即由1改为0。
gpgcheck=0,将&release 改为5(因为我的fedora core版本号为5)
3、开始安装:
yum install --enablerepo=fedora-xgl glitz-glx libsvg libsvg-cairo
yum install --enablerepo=fedora-xgl xorg-x11-server-Xgl  xgl-hardware-list gset-compiz compiz
4、本人由于网速关系,导致下载时失败!于是,直接下载这些个软件到本地,
  每个rpm -ivh xxx.rpm,地址就是我们在2中修改过的http://fedoraxgl.tuxfamily.org/repository/5/i386/
5、配置Xgl,
   #touch /etc/sysconfig/xgl/status
6、执行下面的语句:
   gnome-xgl-info
   gnome-xgl-switch --enable=xgl --auto
此时gnome会自动重新启动!
7、体验吧!
8、其实下面我要学习的是配置compiz,好多快捷键!!呵呵。。。
     gset-compiz是个不错的工具,gconf-editor也同样可以搞定!看自己的习惯了!
截几张图show show....http://en.opensuse.org/Compiz 快捷键的使用参考这里!



参考链接:
1、http://fedora.linuxsir.org/main/?q=node/140
2、http://forums.fedoraforum.org/showthread.php?t=121119
相关阅读 更多 +
排行榜 更多 +
豆荚扫描

豆荚扫描

游戏工具 下载
音跃球球

音跃球球

音乐节奏 下载
小白追书绿色封面

小白追书绿色封面

浏览阅读 下载