XGL guide
Oh my god, this is so out dated… I need to remove this, because it’s useless now
This is an ugly XGL “compile it yourself” FedoraCore5 guide
I’m writing this “guide” for all you FedoraCore5 and NVIDIA graphic card users out there, that want to test out the latest of Xgl technology. Following this guide may heavily damage your FedoraCore5 installation and can make your system unusable, so don’t blame me for the damage, I warned you. I suggest that you wait for somebody to make rpms for Xgl, follow my guide only if you really really must try this out.
1) Packages needed from Fedora repo: yum installation
Execute this command as root: su - to install some dependencies required for compilation:
yum install imake gnome-menus-devel libxklavier-devel gstreamer-plugins-base-devel libxkbfile-devel GConf-devel libwnck-devel libfontenc-devel libxkbui-devel libdmx-devel
2) Working directory
For the following commands it’s best that you stay root for all the work we do from here on. Become root (enter root password) and create a working directory, where all the sources will be compiled:
su - mkdir /tmp/xgl
We will be doing pretty much everything in here.
3) CVS checkouts:
This commands will download the latest sources needed for Xgl. Fist one is simply a login to cvs, then we checkout cairo glitz, Mesa, compiz and xserver xgl branch. cd to /tmp/xgl/
cd /tmp/xgl cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/xorg login cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/cairo co glitz cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa co Mesa cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/xorg co app/compiz cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/xorg co -r xgl-0-0-1 xserver
4) Compiling glitz
cd /tmp/xgl/glitz ./autogen.sh --prefix=/opt/Xgl && make make install
5) Compiling Mesa
cd /tmp/xgl/Mesa echo "MKLIB_OPTIONS = -static" >> configs/linux-indirect make linux-indirect
6) Compiling compiz
You will need to compile control-center and remove the existing control-center-2.14 rpm package by force. Download and save it to /tmp/xgl:
ftp://ftp.gnome.org/pub/gnome/sources/control-center/2.14/control-center-2.14.1.tar.bz2
tar xfvj control-center-2.14.1.tar.bz2 cd control-center-2.14.1 ./configure --prefix=/usr && make rpm -e control-center --nodeps make install
Downlad and save libsvg and libsvg-cairo to /tmp/xgl:
http://cairographics.org/snapshots/libsvg-0.1.4.tar.gz
http://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz
tar xvfz libsvg-0.1.4.tar.gz cd libsvg-0.1.4 ./configure --prefix=/usr && make make install cd .. tar xvfz libsvg-cairo-0.1.6.tar.gz cd libsvg-cairo-0.1.6 ./configure --prefix=/usr && make sudo make install
Compiz installation:
cd /tmp/xgl/app/compiz PKG_CONFIG_PATH=/opt/Xgl/lib/pkgconfig ./autogen.sh --prefix=/opt/Xgl --with-gl-libs="/tmp/xgl/Mesa/lib/libGL.a -pthread -ldrm" --enable-libsvg-cairo make make install
Alternative Compiz: Unofficial Quinn’s Compiz:
Why ? Compiz from Quinn’s cvs is an unofficial Compiz in constant development, it contains the latest unstable Compiz plugins so it might be buggy from time to time. But it has much more fancy effects than official Compiz. You should try it.
Check it out from cvs, and compile it the same way as the official Compiz:
cvs -d:pserver:anonymous@metascape.afraid.org:/cvsroot co compiz
7) Compiling Xgl
You will need some proto software compiled, download these: http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.7.tar.bz2 http://xorg.freedesktop.org/releases/individual/proto/fixesproto-4.0.tar.bz2 http://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-1.1.0.tar.bz2 http://xorg.freedesktop.org/releases/individual/proto/compositeproto-0.3.1.tar.bz2
Unpack them in /tmp/xgl, compile and install every single one of them (4x):
tar xvfj XXXproto-XXX.tar.bz2 cd XXXproto-XXX ./configure --prefix=/usr && make make install
Install macros from util: (optional)
cd /tmp/xgl/xserver/xorg/ cvs co util cd util/macros ./autogen.sh --prefix=/usr && make make install
Compile and install actual xgl xserver now:
cd /tmp/xgl/xserver/xorg PKG_CONFIG_PATH=/opt/Xgl/lib/pkgconfig ./autogen.sh --enable-xgl --disable-xorg --disable-xprint --enable-glx --enable-dri --with-mesa-source=/tmp/xgl/Mesa --with-release-snap=1 --disable-dmx --disable-xvfb --disable-xnest --enable-xglx --enable-xkb --disable-kdriveserver --prefix=/opt/Xgl --with-fontdir=/usr/share/X11/fonts/ make make install
8) Test run:
I’m using these command to run XGL on my laptop with NVIDIA GeForce 6600Go, 1.0.8756 display driver installed. I don’t know if these are the best ways to run Xgl, but it works for me. You can test it, if it all compiled ok, running this:
/opt/Xgl/bin/Xgl :1 -ac -accel glx:pbuffer -accel xv & DISPLAY=:1 /opt/Xgl/bin/compiz decoration wobbly fade minimize cube rotate zoom scale move resize place switcher & DISPLAY=:1 /usr/bin/gnome-terminal & DISPLAY=:1 /opt/Xgl/bin/gnome-window-decorator &
You should have a small Xgl window with gnome-terminal and all the cool Xgl effects. You can run programs from there.
9) Fullscreen session:
UPDATE: Use the “Adding to GDM session” method instead !
I used a small script that launches my Xgl with gnome-session. You need to be in text mode: init 3 and execute this script:
#!/bin/sh #start Xgl server /opt/Xgl/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv & #start compiz DISPLAY=:0 /opt/Xgl/bin/compiz gconf & sleep 3 #init gnome DISPLAY=:0 /opt/Xgl/bin/gnome-window-decorator & DISPLAY=:0 /usr/bin/dbus-launch /usr/bin/gnome-session & #disable Shift+Backspace kill DISPLAY=:0 xmodmap -e "keycode 22 = BackSpace"
NOTE: When you will run gnome session in Xgl for the first time, there might not be any effects, then add them to Configuration Editor(Applications -> System Tools). Find apps/compiz/general/allscreens/options key and under active_plugins you need to add these plugins(in exact same order !):
decoration wobbly fade minimize cube rotate zoom scale move resize place switcher
And now you can enjoy all the beautiful OpenGL hardware accelerated effects. You can browse the apps/compiz/plugins keys to adjust some preferences of compiz plugins.
10) Adding to GDM session:
Add these lines to the end of /etc/gdm/custom.conf file:
[servers] 0=Xgl [server-Xgl] name=Xgl server command=/opt/Xgl/bin/Xgl -accel glx:pbuffer -accel xv chooser=false handled=true flexible=true priority=0
Add these two commands to your GNOME System -> Preferences -> More Preferences -> Sessions: Startup Programs
/opt/Xgl/bin/compiz --replace gconf /opt/Xgl/bin/gnome-window-decorator
You should now have a working Xgl session to login via GDM.
11) It doesn’t work for me !!! compilation errors, dependencies problems, running xgl issues,…
There is a very high possibility that the above guide will not work for you. The CVS sources are updated hourly and new, usually buggy, updates are coming every day. I can’t help you with all the issues you are having, but I can try. I’ll post some links where you can find more info and where you can ask questions.
Other guides/howtos and/or helpful resources:
http://www.freedesktop.org/wiki/Software/Xgl
http://www.ubuntuforums.org/showthread.php?t=131267
Compiz forum: