<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[ZAPPER'S Blog]]></title> 
<link>http://www.rnh19.com/gz/index.php</link> 
<description><![CDATA[]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[ZAPPER'S Blog]]></copyright>
<item>
<link>http://www.rnh19.com/gz/read.php?</link>
<title><![CDATA[在 Fedora Core 5 上体验 Aiglx 和 Xgl  Compiz [2]]]></title> 
<author>zapper &lt;zappershl@hotmail.com&gt;</author>
<category><![CDATA[Linux]]></category>
<pubDate>Mon, 28 Aug 2006 21:10:51 +0000</pubDate> 
<guid>http://www.rnh19.com/gz/read.php?</guid> 
<description>
<![CDATA[ 
	最初是为了好玩，喜欢compiz的效果，再说FC5刚刚发布图新鲜，参照linuxsir的一些帖子装了一把，没想到喷到很多问题，再加上本来就是一个linux菜鸟，一玩就是半个多月，终于搞成功了，总结出一些经验，与大家分享。<br/>好了开始正文：<br/><br/><br/>一、安装显卡驱动<br/>1、下载显卡驱动<br/>首先要安装显卡驱动，打开显卡3D支持。<br/>N系显卡最新驱动是8756，可以到nvidia网站下载（NVIDIA-Linux-x86-1.0-8756-pkg1.run）<br/>A系显卡最新驱动是8.24.8，可以到ATI网站下载，ATI显卡不同系列驱动不一样，请选择相应驱动，RADEON的驱动在这ati-driver-installer-8.24.8-x86.run<br/>2、安装驱动<br/>因为我使用的是MX440，所以下面以该显卡为例讲解，其他显卡请自行查找相关文档。<br/>（安装驱动前，先运行以下glxgears，可以测试显卡3D性能，一般只有几百桢每秒。）<br/>运行以下命令：<br/><br/>代码:<br/><div class="code">init 3</div><br/>切换系统运行级，中止X服务；<br/><br/>代码:<br/><div class="code">chmod 755 NVIDIA-Linux-x86-1.0-8756-pkg1.run<br/>./NVIDIA-Linux-x86-1.0-8756-pkg1.run -n --x-module-path=/usr/lib/xorg/modules</div><br/>执行驱动安装，因为FC5的X服务转向xorg与X11的目录结构不同，所以要添加x-module-path选项（好像是这个原因，具体我也不太清楚，我是菜鸟），其他系统看具体情况决定是否加改参数。<br/>等驱动安装完，回到提示符下<br/><br/>代码:<br/><div class="code">init 5</div><br/>这时候再执行一次glxgears，应该比驱动安装前高很多了，这就说明驱动安装成功了。<br/><br/>二、安装 xgl+compiz<br/>声明：CVS代码可能每天都在变，今天的代码能编译，不代表明天的代码就能编译，有什么问题我只能按我碰到的情况帮大家解答，有些问题我没碰到的，可能大家只能自己找解决方法了 <br/>1、准备工作：让你的xorg能够direct rendring<br/>首先安装glitz(因为Xgl里面的ChangeLog写了要latest glitz)：<br/><br/><div class="code"><br/>cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co glitz进入glitz目录：<br/>./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>下载xgl的源码：<br/><br/><div class="code"><br/>cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co -r xgl-0-0-1 xserver/xorg<br/>下载mesa的源码：</div><br/><br/><div class="code"><br/>cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/mesa co Mesa</div><br/><br/>到我最近一次编译Xgl，需要六个包：<br/>第一个xkbfile:<br/><br/><div class="code"><br/>cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co lib/xkbfile./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第二个GL：<br/><br/><div class="code"><br/>cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co proto/GL./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第三个drm：<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/dri co drm./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第四个Fixes：<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co proto/Fixes./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第五个Composite：<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co proto/Composite./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第六个ScrnSaver：<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co proto/ScrnSaver./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>2、编译、安装Xgl<br/>好了可以开始编译xgl了，在这里需要macros、fontenc、xkbui三个包，他们可以通过FC5的添加删除程序搜索到，这里说到的需要的包一般是指开发包，也就是带devel的，下面说到的编译需要的包一般也是指开发包，不再另外指出。我已开始总是编译不过去就是因为不清楚这一部分，所以这是成功编译的比较关键的地方：<br/>上面的7个包（Mesa在这里先不要编译、安装）编译、安装成功后，进入xorg的目录：<br/><div class="code"><br/>./autogen.sh --prefix=/usr --disable-xorg --disable-dmx --disable-xvfb --disable-xnest --disable-xwin --enable-xgl --enable-xglx --with-mesa-source=/usr/src/Mesa --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --enable-glx-dri --disable-xprint --with-default-font-path=/usr/share/X11/fonts/misc/,/usr/share/X11/fonts/TTF/,/usr/share/X11/fonts/OTF,/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/CID/,/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/75dpi/<br/></div><br/><br/>（注意：--with-mesa-source=/XXX,是你下载的mesa代码的目录）<br/><br/><div class="code"><br/>make &amp;&amp; make install<br/></div><br/><br/>3、编译compiz前的准备工作：<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co app/compiz&#91;code&#93;<br/>在编译compiz之前有一个准备工作，要下载control-center-2.14.0.tar.bz2源码，这里需要gnome-menus和libxklavier包：<br/>解开：<br/><br/>&#91;code&#93;tar -jxvf control-center-2.14.0.tar.bz2</div><br/><br/>进入control-center-2.14.0目录：<br/><br/><div class="code">./configure --prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --sharedstatedir=/usr/share/com --localstatedir=/var</div><br/><br/>configure完了以后不要直接make，而是进入libwindow-settings目录<br/><br/><div class="code">cd libwindow-settings<br/>make &amp;&amp; make install</div><br/><br/>另外，如果要让compiz支持svg需要安装三个包(libsvg cairo libsvg-cairo)，这三个包的安装是有顺序的，也就是说libsvg-cairo必须在另外两个包安装成功后才能被成功编译、安装：<br/>第一个libsvg:<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co libsvg./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>第二个cairo:<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co cairo./autogen.sh --prefix=/usr --enable-svg<br/>make &amp;&amp; make install</div><br/><br/>第三个libsvg-cairo:<br/><br/><div class="code">cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co libsvg-cairo./autogen.sh --prefix=/usr<br/>make &amp;&amp; make install</div><br/><br/>4、编译compiz:<br/>好了可以编译compiz的代码了(需要pango gtk+ libwnck control-center包)：<br/>进入compiz目录：<br/><div class="code">./autogen.sh --prefix=/usr --enable-libsvg-cairo<br/>make &amp;&amp; make install</div><br/><br/>5、剩下最后一步编译mesa的源代码(需要imake包)：<br/><div class="code">cd Mesa<br/>make linux-dri-x86<br/>make install</div><br/><br/>程序会询问你将文件装到哪里，这个是包含了GLX_texture_form_pixmap支持的mesa，compiz要用到，所以运行compiz的时候要设置它找 libGL.so的路径，<br/>即：LD_LIBRARY_PATH=/opt/lib compiz XXXXXXXXX<br/><br/>6、配置系统<br/>配置gdm让它默认启动Xgl<br/>用一下代码替换/etc/gdm/custom.conf<br/><div class="code"><br/># GDM Configuration Customization file.<br/>#<br/># This file is the appropriate place for specifying your customizations to the<br/># GDM configuration. &nbsp; If you run gdmsetup, it will automatically edit this<br/># file for you and will cause the daemon and any running GDM GUI programs to<br/># automatically update with the new configuration. &nbsp;Not all configuration<br/># options are supported by gdmsetup, so to modify some values it may be<br/># necessary to modify this file directly by hand.<br/>#<br/># To hand-edit this file, simply add or modify the key=value combination in<br/># the appropriate section in the template below. &nbsp;Refer to the comments in the<br/># gdm.conf file for information about each option. &nbsp;Also refer to the reference<br/># documentation.<br/>#<br/># If you hand edit a GDM configuration file, you should run the following<br/># command to get the GDM daemon to notice the change. &nbsp;Any running GDM GUI<br/># programs will also be notified to update with the new configuration.<br/>#<br/># gdmflexiserver --command=&quot;UPDATE_CONFIG &lt;configuration key&gt;&quot;<br/>#<br/># For example, the &quot;Enable&quot; key in the &quot;&#91;debug&#93;&quot; section would be specified by<br/># &quot;debug/Enable&quot;.<br/>#<br/># You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and<br/># re-read the new configuration settings. &nbsp;You can also restart GDM by sending<br/># a HUP or USR1 signal to the daemon. &nbsp;HUP behaves like gdm-restart and causes<br/># any user session started by GDM to exit immediately while USR1 behaves like<br/># gdm-safe-restart and will wait until all users log out before restarting GDM.<br/>#<br/># For full reference documentation see the gnome help browser under<br/># GNOME&#124;System category. &nbsp;You can also find the docs in HTML form on<br/># <a href="http://www.gnome.org/projects/gdm/" target="_blank">http://www.gnome.org/projects/gdm/</a><br/>#<br/># NOTE: Lines that begin with &quot;#&quot; are considered comments.<br/>#<br/># Have fun!<br/><br/>&#91;daemon&#93;<br/><br/>&#91;security&#93;<br/><br/>&#91;xdmcp&#93;<br/><br/>&#91;gui&#93;<br/><br/>&#91;greeter&#93;<br/><br/>&#91;chooser&#93;<br/><br/>&#91;debug&#93;<br/><br/>&#91;servers&#93;<br/>0=Xgl<br/><br/>&#91;server-Xgl&#93;<br/>name=Xgl server<br/>command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo<br/>flexible=true<br/>chooser=false<br/>handled=true<br/>priority=0<br/></div><br/><br/>用以下代码替换/usr/bin/gnome-wm<br/><div class="code"><br/>#!/bin/sh<br/><br/># The user can specify his prefered WM by setting the WINDOW_MANAGER<br/># environment variable.<br/>#<br/># If this is not set, we search a list of known windowmanagers and use<br/># the first one that is found in the users&#039;s PATH<br/>#<br/><br/># sm-client-id value<br/>SMID=<br/># default-wm value<br/>DEFWM=<br/><br/>#read in the arguments<br/>GET=<br/>for n in &quot;$@&quot; ; do<br/> &nbsp;case &quot;$GET&quot; in<br/> &nbsp; &nbsp;smid)<br/> &nbsp; &nbsp; &nbsp;SMID=$n<br/> &nbsp; &nbsp; &nbsp;GET=<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;defwm)<br/> &nbsp; &nbsp; &nbsp;DEFWM=$n<br/> &nbsp; &nbsp; &nbsp;GET=<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;*)<br/> &nbsp; &nbsp; &nbsp;case &quot;$n&quot; in<br/> &nbsp; &nbsp; &nbsp; &nbsp;--sm-client-id)<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GET=smid<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp; &nbsp; &nbsp;--default-wm)<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GET=defwm<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp; &nbsp;esac<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp;esac<br/>done<br/><br/># WINDOW_MANAGER overrides all<br/><br/>OLDIFS=$IFS<br/>IFS=&quot;:&quot;<br/>if &#91; -z &quot;$WINDOW_MANAGER&quot; &#93; ; then<br/> &nbsp;if &#91; -z &quot;$DEFWM&quot; -o &quot;x$DEFWM&quot; = &quot;xgnome-wm&quot; &#93;; then<br/> &nbsp; &nbsp;for wm in compiz metacity sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm ; do<br/> &nbsp; &nbsp; &nbsp;for dir in $PATH ; do<br/> &nbsp;if &#91; -x &quot;$dir/$wm&quot; &#93; ; then<br/> &nbsp; &nbsp;WINDOW_MANAGER=&quot;$dir/$wm&quot;<br/> &nbsp; &nbsp; &nbsp; &nbsp;break 2<br/> &nbsp;fi<br/> &nbsp; &nbsp; &nbsp;done<br/> &nbsp; &nbsp;done<br/> &nbsp;else<br/> &nbsp; &nbsp;WINDOW_MANAGER=$DEFWM<br/> &nbsp;fi<br/>fi<br/>IFS=$OLDIFS<br/><br/># If no window manager can be found, we default to xterm<br/><br/>if &#91; -z &quot;$WINDOW_MANAGER&quot; &#93; ; then<br/> &nbsp;echo &quot;WARNING: No window manager can be found.&quot;<br/> &nbsp;WINDOW_MANAGER=xterm<br/>fi<br/><br/># Now create options OPT1 and OPT2 based on the windowmanager used<br/>OPT1=<br/>OPT2=<br/>if &#91; ! -z &quot;$SMID&quot; &#93; ; then<br/> &nbsp;case `basename $WINDOW_MANAGER` in<br/> &nbsp; &nbsp;sawfish&#124;sawmill&#124;metacity)<br/> &nbsp; &nbsp; &nbsp;OPT1=--sm-client-id=$SMID<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;openbox)<br/> &nbsp; &nbsp; &nbsp;OPT1=--sm-client-id<br/> &nbsp; &nbsp; &nbsp;OPT2=$SMID<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;enlightenment&#124;twm)<br/> &nbsp; &nbsp; &nbsp;OPT1=-clientId<br/> &nbsp; &nbsp; &nbsp;OPT2=$SMID<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;lwm)<br/> &nbsp; &nbsp; &nbsp;OPT1=-s<br/> &nbsp; &nbsp; &nbsp;OPT2=$SMID<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;compiz)<br/> &nbsp; &nbsp; &nbsp;OPT1=&quot;--sm-client-id $SMID&quot;<br/> &nbsp; &nbsp; &nbsp;OPT2=&quot;gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher water&quot;<br/> &nbsp; &nbsp; &nbsp;;;<br/> &nbsp; &nbsp;#FIXME: add all other windowmanagers here with their proper options<br/> &nbsp;esac<br/>fi<br/><br/>LD_LIBRARY_PATH=/usr/local/lib exec $WINDOW_MANAGER $OPT1 $OPT2<br/><br/>echo &quot;ERROR: No window manager could run!&quot;<br/></div><br/><br/>注意：这里的LD_LIBRARY_PATH=/usr/local/lib就是前面Mesa的安装目录，确省目录是这一个，如果你做了修改，请自行改成相应目录。<br/>配置gnome会话，让gnome启动的时候运行gnome-window-decorator<br/><br/>注意事项：<br/>如果是使用ATI显卡的fglrx驱动的话，记得Xgl要从DISPLAY 1启动，即<br/><div class="code"><br/>1=Xgl<br/>/usr/bin/Xgl :1 -fullscreen -ac -accel glx:pbuffer -accel xv:pbuffer<br/></div><br/><br/>而不是<br/><br/><div class="code"><br/>0=Xgl<br/>/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo<br/></div><br/><br/>好了，现在可以重新启动Xserver，看看绚丽的桌面了。<br/><br/><br/><a href="http://zh.gentoo-wiki.com/HOWTO_XGL" target="_blank">这里有一些Xgl+compiz的Howto</a>，大家可以参考一下。<br/>声明：以上环境是在FC5+2080内核+gnome下完成的，不同环境也许有不同的问题，大家提出来我会尽我所能回答，不过我也是菜鸟，能力有限。<br/><br/>引用自: <a href="http://www.et8.net/bbs" target="_blank">CCF精品技术论坛</a><br/>Tags - <a href="tag.php?tag=linux" rel="tag">linux</a> , <a href="tag.php?tag=fedoracore5" rel="tag">fedoracore5</a> , <a href="tag.php?tag=aiglx" rel="tag">aiglx</a> , <a href="tag.php?tag=xgl" rel="tag">xgl</a> , <a href="tag.php?tag=compiz" rel="tag">compiz</a>
]]>
</description>
</item><item>
<link>http://www.rnh19.com/gz/read.php?&amp;guid=0#topreply</link>
<title><![CDATA[[评论] 在 Fedora Core 5 上体验 Aiglx 和 Xgl  Compiz [2]]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.rnh19.com/gz/read.php?&amp;guid=0#topreply</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>