Difference between revisions of "XGL-Ubuntu"

From cchtml.com
Jump to: navigation, search
 
Line 1: Line 1:
 
== How to install Xgl/Compiz on Ubuntu Dapper: The Kombatant Way ==
 
== How to install Xgl/Compiz on Ubuntu Dapper: The Kombatant Way ==
  
So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it  So here goes:
+
<p><font face="Calibri">So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it  So here goes:
  
1. These instructions are targeted for those people using the ATI Proprietary Driver ("fglrx") and having WORKING 3D ACCELERATION. This is configured in your xorg.conf. To make sure you are "accelerated", running with the new driver, try typing fglrxinfo in a terminal and see what you get. If it talks about ATI then awesome... if it talks about Mesa, you still don't have your driver setup properly (xorg.conf). Your xorg.conf file doesn't need any special parametres - what I did was simply generate the default xorg.conf file with the command:
+
</font></p>
<blockquote><i>sudo dpkg-reconfigure xserver-xorg</i></blockquote>
+
<table border="0" width="100%" id="table19" style="border-left-width: 0px; border-top-width: 0px; border-bottom-width: 0px">
and replace the "ati" instance with "fglrx". Nothing more.
+
<tr>
 
+
<td width="26" valign="top" style="border-style: none; border-width: medium">
2. If you want the absolute newest stuff, then you're going to have to add some lines to your repositories. So open the /etc/apt/sources.list file as root, and add these lines:
+
<b><font face="Calibri">1.</font></b></td>
<blockquote><i>#compiz Quinn's
+
<td style="border-left-style: none; border-left-width: medium; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
<p>deb http://www.beerorkid.com/compiz dapper main</p>
+
<font face="Calibri">These instructions are targeted for those people  
 +
using the ATI Proprietary Driver (&quot;fglrx&quot;) and having WORKING 3D  
 +
ACCELERATION. This is configured in your xorg.conf. To make sure you are  
 +
&quot;accelerated&quot;, running with the new driver, try typing fglrxinfo in a  
 +
terminal and see what you get. If it talks about ATI then awesome... if  
 +
it talks about Mesa, you still don't have your driver setup properly (xorg.conf).  
 +
Your xorg.conf file doesn't need any special parametres - what I did was  
 +
simply generate the default xorg.conf file with the command: </font>
 +
<blockquote>
 +
<table border="1" id="table20">
 +
<tr>
 +
<td><font face="Consolas"><i>sudo dpkg-reconfigure xserver-xorg</i></font></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">and replace the "ati" instance with "fglrx". Nothing more.
 +
</font></td>
 +
</tr>
 +
<tr>
 +
<td width="26" valign="top" style="border-style: none; border-width: medium">
 +
<b><font face="Calibri">2.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">If you want the absolute newest stuff, then you're  
 +
going to have to add some lines to your repositories. So open the  
 +
/etc/apt/sources.list file as root, and add these lines: </font>
 +
<blockquote>
 +
<table border="1" id="table21">
 +
<tr>
 +
<td><i><font face="Consolas">#compiz Quinn's </font>
 +
<p><font face="Consolas">deb http://www.beerorkid.com/compiz dapper main</font></p>
 
<p></p>
 
<p></p>
<p>deb http://xgl.compiz.info/ dapper main</p>
+
<p><font face="Consolas">deb http://xgl.compiz.info/ dapper main</font></p>
<p>deb-src http://xgl.compiz.info/ dapper main</p></i></blockquote>
+
<p><font face="Consolas">deb-src http://xgl.compiz.info/ dapper main</font></p></i>
This will add two repositories that carry the latest versions of all the Cool Stuff(tm). Then do:
+
</td>
<blockquote><i>wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
+
</tr>
<p>sudo apt-get update</p>
+
</table>
<p>sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome</p></i></blockquote>
+
</blockquote>
Note that if you get the error
+
<font face="Calibri">This will add two repositories that carry the  
<blockquote><i>trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core</i></blockquote>
+
latest versions of all the Cool Stuff(tm). Then do: </font>
issue a  
+
<blockquote><i>
<blockquote><i>sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz</i></blockquote>
+
<table border="1" id="table22">
and then do a
+
<tr>
<blockquote><i>sudo apt-get -f install</i></blockquote> to continue.
+
<td><i><font face="Consolas">wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add - </font>
 
+
<p><font face="Consolas">sudo apt-get update</font></p>
3. Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. So here goes. From the terminal, issue the command:
+
<p><font face="Consolas">sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome</font></p></i></td>
<blockquote><i>sudo gedit /usr/bin/startxgl.sh</i></blockquote>
+
</tr>
and add these as contents:
+
</table>
<blockquote><i>Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
+
</i></blockquote>
 +
<font face="Calibri">Note that if you get the error </font>
 +
<blockquote>
 +
<table border="1" id="table23">
 +
<tr>
 +
<td><i><font face="Consolas">trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">issue a </font>
 +
<blockquote>
 +
<table border="1" id="table24">
 +
<tr>
 +
<td><i><font face="Consolas">sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">and then do a </font>
 +
<blockquote>
 +
<table border="1" id="table25">
 +
<tr>
 +
<td><i><font face="Consolas">sudo apt-get -f install</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote> <font face="Calibri">to continue. </font></td>
 +
</tr>
 +
<tr>
 +
<td width="26" valign="top" style="border-style: none; border-width: medium">
 +
<b><font face="Calibri">3.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">Instead of messing with gdm.conf and gdm.conf-custom,  
 +
we're going to do something better. So here goes. From the terminal,  
 +
issue the command: </font>
 +
<blockquote>
 +
<table border="1" id="table26">
 +
<tr>
 +
<td><i><font face="Consolas">sudo gedit /usr/bin/startxgl.sh</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">and add these as contents:
 +
</font>
 +
<blockquote><i>
 +
<table border="1" id="table27">
 +
<tr>
 +
<td><i><font face="Consolas">Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
 +
</font>
 
<p></p>
 
<p></p>
<p>exec gnome-session</p></i></blockquote>  
+
<p><font face="Consolas">exec gnome-session</font></p></i></td>
Save it, and then issue the command:
+
</tr>
<blockquote><i>sudo chmod 755 /usr/bin/startxgl.sh</i></blockquote>
+
</table>
 
+
</i></blockquote>  
4. From the terminal again:
+
<font face="Calibri">Save it, and then issue the command:
<blockquote><i>sudo gedit /usr/share/xsessions/xgl.desktop</i></blockquote>  
+
</font>
and add this as its contents:
+
<blockquote>
<blockquote><i>[Desktop Entry]
+
<table border="1" id="table28">
<p>Encoding=UTF-8</p>
+
<tr>
<p>Name=XGl</p>
+
<td><i><font face="Consolas">sudo chmod 755 /usr/bin/startxgl.sh</font></i></td>
<p>Exec=/usr/bin/startxgl.sh</p>
+
</tr>
<p>Icon=</p>
+
</table>
<p>Type=Application</p></i></blockquote>
+
</blockquote>
 
+
5.And again, from the terminal:
+
<blockquote><i>sudo gedit /usr/bin/startcompiz</i></blockquote>
+
and inside it add the following:
+
<blockquote><i>killall gnome-window-decorator
+
<p>wait</p>
+
<p>gnome-window-decorator & DISPLAY=:1 LD_PRELOAD=/opt/mesa/libGL.so.1.2 compiz --replace gconf</p></i></blockquote>
+
and
+
<blockquote><i>sudo chmod 755 /usr/bin/startcompiz</i></blockquote>
+
I can already see some of you complaining: "Hey, there is no such thing as /opt/mesa/libGL thing!! Please carry on to step 6 and everything will be cleared
+
 
+
6. So here's the trick. What we've done is to add a new session in gdm. This means that, when gdm loads, you can select the "Xgl" session instead of the normal session you usually use, and it'll load Xgl. It would be a good idea to either load /usr/bin/startcompiz from your System > Preferences > Sessions, in order for it to load automatically, or just add a link to your desktop and double-click it to work. That way, if something goes horribly wrong, you can simply reboot, and when gdm loads , you will be able to select your normal (and working) session again without editing files all the time. Now, from here on we have one more step to make.
+
  
7. And here comes the big part: the mesa libraries. I see many people having the well-known "compiz.real: GLX_EXT_texture from pixmap is missing" error, and they can't seem to find out why this happens. Well, the reason as simple and as complicated the message suggests: this certain extension is NOT supported by ATI's driver (nVidia doesn't support it either, so no need to go OMGATILOOSE etc ). So, in order to run compiz, you're going to have to resort to standard mesa libraries. But, I hear you ask, where should I find these? The answer is simple: package libgl1-mesa has them. Now read carefully: when you install this particular package via apt-get, it'll place a libGL.so.1.2 inside your /usr/lib, and a symlink file called libGL.so.1 which points to the libGL.so.1.2 file. Now, if you install the ATI drivers by using the installer, these files will be replaced by symlinks to ATI's libGL.so.1.2 which resides inside /usr/lib/fglrx. So what do you do? After installing libgl-mesa and before installing ATI's drivers, create a directory called /opt/mesa and copy the file there, like this:
+
</td>
<blockquote><i>sudo mkdir /opt/mesa
+
</tr>
<p>sudo cp /usr/lib/libGL.so.1.2 /opt/mesa/libGL.so.1.2</p></i></blockquote>
+
<tr>
Now install ATI's drivers; it will replace the files inside /usr/lib, but you'll already have the libGL file you are interested in saved in the location we created. If you have already installed ATI's drivers, and then installed libgl1-mesa, ATI's symlinks will be lost. So proceed to create /opt/mesa and copy the file there as normal; then create the two symlinks by hand, like this:
+
<td width="26" valign="top" style="border-style: none; border-width: medium">
<blockquote><i>sudo rm /usr/lib/libGL.so.1
+
<b><font face="Calibri">4.</font></b></td>
<p>sudo rm /usr/lib/libGL.so.1.2</p>
+
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
<p>sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1</p>
+
<font face="Calibri">From the terminal again: </font>
<p>sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1.2</p></i></blockquote>
+
<blockquote>
 +
<table border="1" id="table29">
 +
<tr>
 +
<td><i><font face="Consolas">sudo gedit /usr/share/xsessions/xgl.desktop</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">and add this as its contents:
 +
</font>
 +
<blockquote><i>
 +
<table border="1" id="table30">
 +
<tr>
 +
<td><i><font face="Consolas">[Desktop Entry]
 +
</font>
 +
<p><font face="Consolas">Encoding=UTF-8</font></p>
 +
<p><font face="Consolas">Name=XGl</font></p>
 +
<p><font face="Consolas">Exec=/usr/bin/startxgl.sh</font></p>
 +
<p><font face="Consolas">Icon=</font></p>
 +
<p><font face="Consolas">Type=Application</font></p></i></td>
 +
</tr>
 +
</table>
 +
</i></blockquote>
  
8. After all that, we are ready. Reboot your machine and when gdm loads, look at the sessions; if you see an "Xgl" session there, everything's going according to plan. Load it up, and hopefully everything will be working On my occassion, the login screen is a little slow, so don't panic if you see something like that. Everything should be quick once compiz is loaded. You'll also notice that the window decoration has changed; again, this is normal, for now, this is the only window decoration available. I am certain proper support for the Metacity window decorations will be added soon.
+
</td>
 +
</tr>
 +
<tr>
 +
<td width="26" valign="top" style="border-style: none; border-width: medium">
 +
<b><font face="Calibri">5.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">And again, from the terminal: </font>
 +
<blockquote>
 +
<table border="1" id="table31">
 +
<tr>
 +
<td><i><font face="Consolas">sudo gedit /usr/bin/startcompiz</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">and inside it add the following:
 +
</font>
 +
<blockquote><i>
 +
<table border="1" id="table32">
 +
<tr>
 +
<td><i><font face="Consolas">killall gnome-window-decorator </font>
 +
<p><font face="Consolas">wait</font></p>
 +
<p><font face="Consolas">gnome-window-decorator & DISPLAY=:1 LD_PRELOAD=/opt/mesa/libGL.so.1.2 compiz --replace gconf</font></p></i>
 +
</td>
 +
</tr>
 +
</table>
 +
</i></blockquote>
 +
<font face="Calibri">and
 +
</font>
 +
<blockquote>
 +
<table border="1" id="table33">
 +
<tr>
 +
<td><i><font face="Consolas">sudo chmod 755 /usr/bin/startcompiz</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">I can already see some of you complaining: "Hey, there is no such thing as /opt/mesa/libGL thing!! Please carry on to step 6 and everything will be cleared
 +
</font></td>
 +
</tr>
 +
<tr>
 +
<td width="26" valign="top" style="border-style: none; border-width: medium">
 +
<b><font face="Calibri">6.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">So here's the trick. What we've done is to add a
 +
new session in gdm. This means that, when gdm loads, you can select the  
 +
&quot;Xgl&quot; session instead of the normal session you usually use, and it'll
 +
load Xgl. It would be a good idea to either load /usr/bin/startcompiz
 +
from your System &gt; Preferences &gt; Sessions, in order for it to load
 +
automatically, or just add a link to your desktop and double-click it to
 +
work. That way, if something goes horribly wrong, you can simply reboot,
 +
and when gdm loads , you will be able to select your normal (and
 +
working) session again without editing files all the time. Now, from
 +
here on we have one more step to make. </font></td>
 +
</tr>
 +
<tr>
 +
<td width="26" valign="top" style="border-style: none; border-width: medium">
 +
<b><font face="Calibri">7.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">And here comes the big part: the mesa libraries. I
 +
see many people having the well-known &quot;compiz.real: GLX_EXT_texture from
 +
pixmap is missing&quot; error, and they can't seem to find out why this
 +
happens. Well, the reason as simple and as complicated the message
 +
suggests: this certain extension is NOT supported by ATI's driver (nVidia
 +
doesn't support it either, so no need to go OMGATILOOSE etc ). So, in
 +
order to run compiz, you're going to have to resort to standard mesa
 +
libraries. But, I hear you ask, where should I find these? The answer is  
 +
simple: package libgl1-mesa has them. Now read carefully: when you
 +
install this particular package via apt-get, it'll place a libGL.so.1.2
 +
inside your /usr/lib, and a symlink file called libGL.so.1 which points
 +
to the libGL.so.1.2 file. Now, if you install the ATI drivers by using
 +
the installer, these files will be replaced by symlinks to ATI's
 +
libGL.so.1.2 which resides inside /usr/lib/fglrx. So what do you do?
 +
After installing libgl-mesa and before installing ATI's drivers, create
 +
a directory called /opt/mesa and copy the file there, like this: </font>
 +
<blockquote><i>
 +
<table border="1" id="table34">
 +
<tr>
 +
<td><i><font face="Consolas">sudo mkdir /opt/mesa </font>
 +
<p><font face="Consolas">sudo cp /usr/lib/libGL.so.1.2 /opt/mesa/libGL.so.1.2</font></p></i>
 +
</td>
 +
</tr>
 +
</table>
 +
</i></blockquote>
 +
<font face="Calibri">Now install ATI's drivers; it will replace the files inside /usr/lib, but you'll already have the libGL file you are interested in saved in the location we created. If you have already installed ATI's drivers, and then installed libgl1-mesa, ATI's symlinks will be lost. So proceed to create /opt/mesa and copy the file there as normal; then create the two symlinks by hand, like this:
 +
</font>
 +
<blockquote><i>
 +
<table border="1" id="table35">
 +
<tr>
 +
<td><i><font face="Consolas">sudo rm /usr/lib/libGL.so.1 </font>
 +
<p><font face="Consolas">sudo rm /usr/lib/libGL.so.1.2</font></p>
 +
<p><font face="Consolas">sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1</font></p>
 +
<p><font face="Consolas">sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1.2</font></p></i>
 +
</td>
 +
</tr>
 +
</table>
 +
</i></blockquote>
  
9. You should have a "apps/compiz" section in gconf-editor. If you don't, don't worry about it; I don't either, and the effects work like a charm. To get around the problem with <Shift> and <Backspace> enter this in your terminal whenever you login:
+
</td>
<blockquote><i>xmodmap /usr/share/xmodmap/xmodmap.<language></i></blockquote>
+
</tr>
where <language> refers to your country's code. For the US, it would be:
+
<tr>
<blockquote><i>xmodmap /usr/share/xmodmap/xmodmap.us</i></blockquote>
+
<td width="26" valign="top" style="border-style: none; border-width: medium">
Or, of course, append it to the .gnomerc file.
+
<b><font face="Calibri">8.</font></b></td>
 +
<td style="border-left-style: none; border-left-width: medium; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" valign="top">
 +
<font face="Calibri">After all that, we are ready. Reboot your machine
 +
and when gdm loads, look at the sessions; if you see an &quot;Xgl&quot; session
 +
there, everything's going according to plan. Load it up, and hopefully
 +
everything will be working On my occassion, the login screen is a little
 +
slow, so don't panic if you see something like that. Everything should
 +
be quick once compiz is loaded. You'll also notice that the window
 +
decoration has changed; again, this is normal, for now, this is the only
 +
window decoration available. I am certain proper support for the
 +
Metacity window decorations will be added soon. When you login, you should have a  
 +
&quot;apps/compiz&quot; section in gconf-editor. If you don't, don't worry about  
 +
it; I don't either, and the effects work like a charm. To get around the  
 +
problem with <Shift> and <Backspace> enter this in your terminal whenever you login:
 +
</font>
 +
<blockquote>
 +
<table border="1" id="table36">
 +
<tr>
 +
<td><i><font face="Consolas">xmodmap /usr/share/xmodmap/xmodmap.&lt;language&gt;</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">where &lt;lanbguage&gt; refers to your country's code. For the US, it would be:
 +
</font>
 +
<blockquote>
 +
<table border="1" id="table37">
 +
<tr>
 +
<td><i><font face="Consolas">xmodmap /usr/share/xmodmap/xmodmap.us</font></i></td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
<font face="Calibri">Or, of course, append it to the .gnomerc file.
  
 
Once everything is running along happily, this is a good appendix for the commands for using the nifty stuff compiz gives you:
 
Once everything is running along happily, this is a good appendix for the commands for using the nifty stuff compiz gives you:
 
http://en.opensuse.org/Compiz
 
http://en.opensuse.org/Compiz
  
Hopefully somebody will find all these useful - I will also update this with more suggested information and tips, to cover more potential problems/configrations. So if you have something to propose, post away
+
Hopefully somebody will find all these useful - I will also update this with more suggested information and tips, to cover more potential problems/configurations.  
 +
Any additional suggestions will be more than welcome.</font></td>
 +
</tr>
 +
</table>

Revision as of 15:03, 23 April 2006

How to install Xgl/Compiz on Ubuntu Dapper: The Kombatant Way

So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it So here goes:

1.

These instructions are targeted for those people using the ATI Proprietary Driver ("fglrx") and having WORKING 3D ACCELERATION. This is configured in your xorg.conf. To make sure you are "accelerated", running with the new driver, try typing fglrxinfo in a terminal and see what you get. If it talks about ATI then awesome... if it talks about Mesa, you still don't have your driver setup properly (xorg.conf). Your xorg.conf file doesn't need any special parametres - what I did was simply generate the default xorg.conf file with the command:

sudo dpkg-reconfigure xserver-xorg

and replace the "ati" instance with "fglrx". Nothing more.

2.

If you want the absolute newest stuff, then you're going to have to add some lines to your repositories. So open the /etc/apt/sources.list file as root, and add these lines:

#compiz Quinn's

deb http://www.beerorkid.com/compiz dapper main

deb http://xgl.compiz.info/ dapper main

deb-src http://xgl.compiz.info/ dapper main

This will add two repositories that carry the latest versions of all the Cool Stuff(tm). Then do:

wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -

sudo apt-get update

sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome

Note that if you get the error

trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core

issue a

sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz

and then do a

sudo apt-get -f install
to continue.
3.

Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. So here goes. From the terminal, issue the command:

sudo gedit /usr/bin/startxgl.sh

and add these as contents:

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1

exec gnome-session

Save it, and then issue the command:

sudo chmod 755 /usr/bin/startxgl.sh
4.

From the terminal again:

sudo gedit /usr/share/xsessions/xgl.desktop

and add this as its contents:

[Desktop Entry]

Encoding=UTF-8

Name=XGl

Exec=/usr/bin/startxgl.sh

Icon=

Type=Application

5.

And again, from the terminal:

sudo gedit /usr/bin/startcompiz

and inside it add the following:

killall gnome-window-decorator

wait

gnome-window-decorator & DISPLAY=:1 LD_PRELOAD=/opt/mesa/libGL.so.1.2 compiz --replace gconf

and

sudo chmod 755 /usr/bin/startcompiz

I can already see some of you complaining: "Hey, there is no such thing as /opt/mesa/libGL thing!! Please carry on to step 6 and everything will be cleared

6.

So here's the trick. What we've done is to add a new session in gdm. This means that, when gdm loads, you can select the "Xgl" session instead of the normal session you usually use, and it'll load Xgl. It would be a good idea to either load /usr/bin/startcompiz from your System > Preferences > Sessions, in order for it to load automatically, or just add a link to your desktop and double-click it to work. That way, if something goes horribly wrong, you can simply reboot, and when gdm loads , you will be able to select your normal (and working) session again without editing files all the time. Now, from

here on we have one more step to make.
7.

And here comes the big part: the mesa libraries. I see many people having the well-known "compiz.real: GLX_EXT_texture from pixmap is missing" error, and they can't seem to find out why this happens. Well, the reason as simple and as complicated the message suggests: this certain extension is NOT supported by ATI's driver (nVidia doesn't support it either, so no need to go OMGATILOOSE etc ). So, in order to run compiz, you're going to have to resort to standard mesa libraries. But, I hear you ask, where should I find these? The answer is simple: package libgl1-mesa has them. Now read carefully: when you install this particular package via apt-get, it'll place a libGL.so.1.2 inside your /usr/lib, and a symlink file called libGL.so.1 which points to the libGL.so.1.2 file. Now, if you install the ATI drivers by using the installer, these files will be replaced by symlinks to ATI's libGL.so.1.2 which resides inside /usr/lib/fglrx. So what do you do? After installing libgl-mesa and before installing ATI's drivers, create a directory called /opt/mesa and copy the file there, like this:

sudo mkdir /opt/mesa

sudo cp /usr/lib/libGL.so.1.2 /opt/mesa/libGL.so.1.2

Now install ATI's drivers; it will replace the files inside /usr/lib, but you'll already have the libGL file you are interested in saved in the location we created. If you have already installed ATI's drivers, and then installed libgl1-mesa, ATI's symlinks will be lost. So proceed to create /opt/mesa and copy the file there as normal; then create the two symlinks by hand, like this:

sudo rm /usr/lib/libGL.so.1

sudo rm /usr/lib/libGL.so.1.2

sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1

sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1.2

8.

After all that, we are ready. Reboot your machine and when gdm loads, look at the sessions; if you see an "Xgl" session there, everything's going according to plan. Load it up, and hopefully everything will be working On my occassion, the login screen is a little slow, so don't panic if you see something like that. Everything should be quick once compiz is loaded. You'll also notice that the window decoration has changed; again, this is normal, for now, this is the only window decoration available. I am certain proper support for the Metacity window decorations will be added soon. When you login, you should have a "apps/compiz" section in gconf-editor. If you don't, don't worry about it; I don't either, and the effects work like a charm. To get around the problem with <Shift> and <Backspace> enter this in your terminal whenever you login:

xmodmap /usr/share/xmodmap/xmodmap.<language>

where <lanbguage> refers to your country's code. For the US, it would be:

xmodmap /usr/share/xmodmap/xmodmap.us

Or, of course, append it to the .gnomerc file.

Once everything is running along happily, this is a good appendix for the commands for using the nifty stuff compiz gives you: http://en.opensuse.org/Compiz

Hopefully somebody will find all these useful - I will also update this with more suggested information and tips, to cover more potential problems/configurations.

Any additional suggestions will be more than welcome.