Difference between revisions of "XGL-Ubuntu"

From cchtml.com
Jump to: navigation, search
 
m (Reverted edits by 92.99.234.132 (talk) to last revision by Mooninite)
 
(40 intermediate revisions by 22 users not shown)
Line 1: Line 1:
== How to install Xgl/Compiz on Ubuntu Dapper: The Kombatant Way ==
+
== Xgl/Beryl on Ubuntu/Gnome - the Kombatant Way [updated 6/10/2006] ==
  
So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it So here goes:
+
So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it. I've updated it too, and now instead of Compiz it uses Beryl, which imo is much better and has much more potential.
  
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:
+
Before we start, I want to make clear that 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). We have an excellent how-to here in the wiki (here: [[Ubuntu]]), which works - try it out!
<blockquote><i>sudo dpkg-reconfigure xserver-xorg</i></blockquote>
+
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:
+
* 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 in order to add the two repositories that are of interest here.
<blockquote><i>#compiz Quinn's
+
 
<p>deb http://www.beerorkid.com/compiz dapper main</p>
+
    #Beryl Repositories for Dapper Drake (Ubuntu 6.06)
<p></p>
+
    deb http://ubuntu.beryl-project.org/ dapper main
<p>deb http://xgl.compiz.info/ dapper main</p>
+
 
<p>deb-src http://xgl.compiz.info/ dapper main</p></i></blockquote>
+
or
This will add two repositories that carry the latest versions of all the Cool Stuff(tm). Then do:
+
 
<blockquote><i>wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
+
    #Beryl Repositories for Edgy Eft (Ubuntu 6.10)
<p>sudo apt-get update</p>
+
    deb http://ubuntu.beryl-project.org/ edgy main
<p>sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome</p></i></blockquote>
+
 
Note that if you get the error
+
* To use the Ubuntu Dapper Drake Beryl SVN daily snapshots, add (also) those repositories:
<blockquote><i>trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core</i></blockquote>
+
 
issue a
+
    # Treviño's Beryl-SVN Ubuntu Repository
<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>
+
    # GPG key: 81836EBF
and then do a
+
    deb http://3v1n0.tuxfamily.org dapper beryl-svn
<blockquote><i>sudo apt-get -f install</i></blockquote> to continue.
+
 
 +
or
 +
 
 +
    # Treviño's Beryl-SVN Ubuntu Edgy Eft Repository
 +
    # GPG key: 81836EBF
 +
    deb http://3v1n0.tuxfamily.org edgy beryl-svn
 +
 
 +
 
 +
* After you add the repos in the sources.list file, issue the following commands:
 +
 
 +
    wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
 +
 
 +
    sudo apt-get update
 +
 
 +
    sudo apt-get install xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 beryl emerald-themes
 +
 
 +
* If during the apt-get installation you get the error ''"trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core"'' issue the following two commands to continue:
 +
 
 +
    sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz
 +
 
 +
    sudo apt-get -f install
 +
 
 +
* Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. From the terminal, issue the command:
 +
 
 +
    sudo gedit /usr/bin/startxgl.sh
  
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:
 
<blockquote><i>sudo gedit /usr/bin/startxgl.sh</i></blockquote>
 
 
and add these as contents:
 
and add these as contents:
<blockquote><i>Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
+
 
<p></p>
+
    Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer &  
<p>exec gnome-session</p></i></blockquote>
+
    sleep 2 && DISPLAY=:1 exec gnome-session
 +
 
 
Save it, and then issue the command:
 
Save it, and then issue the command:
<blockquote><i>sudo chmod 755 /usr/bin/startxgl.sh</i></blockquote>
 
  
4. From the terminal again:
+
    sudo chmod 755 /usr/bin/startxgl.sh
<blockquote><i>sudo gedit /usr/share/xsessions/xgl.desktop</i></blockquote>
+
 
 +
* From the terminal again:
 +
 
 +
    sudo gedit /usr/share/xsessions/xgl.desktop
 +
 
 
and add this as its contents:
 
and add this as its contents:
<blockquote><i>[Desktop Entry]
 
<p>Encoding=UTF-8</p>
 
<p>Name=XGl</p>
 
<p>Exec=/usr/bin/startxgl.sh</p>
 
<p>Icon=</p>
 
<p>Type=Application</p></i></blockquote>
 
  
5.And again, from the terminal:
+
    [Desktop Entry]
<blockquote><i>sudo gedit /usr/bin/startcompiz</i></blockquote>
+
    Encoding=UTF-8
and inside it add the following:
+
    Name=XGL
<blockquote><i>killall gnome-window-decorator
+
    Exec=/usr/bin/startxgl.sh
<p>wait</p>
+
    Icon=
<p>gnome-window-decorator & DISPLAY=:1 LD_PRELOAD=/opt/mesa/libGL.so.1.2 compiz --replace gconf</p></i></blockquote>
+
    Type=Application
and
+
 
<blockquote><i>sudo chmod 755 /usr/bin/startcompiz</i></blockquote>
+
* 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. 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.
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
+
 
 +
* After all that, we are ready. Reboot your machine (yes, reboot) and when GDM loads, look at the sessions; if you see an "XGL" session there, everything's going according to plan. Load it up (make it your default session, if you want to), and hopefully everything will be working. We're half-way there anyway. All you need to do now, is open the System->Preferences->Sessions->Startup Programs and add the following:
 +
 
 +
    xmodmap /usr/share/xmodmap/xmodmap.us
 +
    gnome-settings-daemon
 +
    beryl-manager
 +
   
 +
Of course, if you are using a different locale, you can substitute xmodmap.us with your appropriate file.
 +
 
 +
* Logout and login again. If everything is running along happily, you'll see the beryl splash screen, and the emerald-like icon of beryl in your tray. If beryl doesn't load initially, just right click the icon, and Select Window Manager->Beryl. Now right click the icon again, and load up Emerald (the window decorator) and choose the theme that you like best. You can also tinker with the settings at your heart's content.
  
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.
+
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.
 +
-----------------
  
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:
+
=== Has anyone got this working on feisty herd 4 ? ===
<blockquote><i>sudo mkdir /opt/mesa
+
yes
<p>sudo cp /usr/lib/libGL.so.1.2 /opt/mesa/libGL.so.1.2</p></i></blockquote>
+
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:
+
<blockquote><i>sudo rm /usr/lib/libGL.so.1
+
<p>sudo rm /usr/lib/libGL.so.1.2</p>
+
<p>sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1</p>
+
<p>sudo ln -sf /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1.2</p></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.
+
yes: after first reboot
 +
no: since then.
 +
and yes: again then. you need to activate desktop effects in ubuntu. this does the job.
  
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:
+
=== Feedback (7.04) ===
<blockquote><i>xmodmap /usr/share/xmodmap/xmodmap.<language></i></blockquote>
+
Newbie: The Part about the Session Manager is unclear and I think my error (the No above) is related to it.
where <language> refers to your country's code. For the US, it would be:
+
<blockquote><i>xmodmap /usr/share/xmodmap/xmodmap.us</i></blockquote>
+
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:
+
Newbie: How can you prove if the installation has been done right to a certain extend? My Problem is, after the first reboot it worked. Then while starting over again it did not.
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
+
Newbie: How can I remove a compelte Sesssion so I am able to start over again?

Latest revision as of 10:57, 6 October 2012

Xgl/Beryl on Ubuntu/Gnome - the Kombatant Way [updated 6/10/2006][edit]

So here we are, rewriting the whole guide, just because I found out a more bullet-proof way to do it. I've updated it too, and now instead of Compiz it uses Beryl, which imo is much better and has much more potential.

Before we start, I want to make clear that 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). We have an excellent how-to here in the wiki (here: Ubuntu), which works - try it out!

  • 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 in order to add the two repositories that are of interest here.
   #Beryl Repositories for Dapper Drake (Ubuntu 6.06)
   deb http://ubuntu.beryl-project.org/ dapper main

or

   #Beryl Repositories for Edgy Eft (Ubuntu 6.10)
   deb http://ubuntu.beryl-project.org/ edgy main
  • To use the Ubuntu Dapper Drake Beryl SVN daily snapshots, add (also) those repositories:
   # Treviño's Beryl-SVN Ubuntu Repository
   # GPG key: 81836EBF
   deb http://3v1n0.tuxfamily.org dapper beryl-svn

or

   # Treviño's Beryl-SVN Ubuntu Edgy Eft Repository
   # GPG key: 81836EBF
   deb http://3v1n0.tuxfamily.org edgy beryl-svn


  • After you add the repos in the sources.list file, issue the following commands:
   wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
   sudo apt-get update
   sudo apt-get install xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 beryl emerald-themes
  • If during the apt-get installation you get the error "trying to overwrite `/usr/share/man/man1/Xserver.1x.gz', which is also in package xserver-xorg-core" issue the following two commands to continue:
   sudo dpkg-divert --package xserver-xorg-core --divert /usr/share/man/man1/Xserver.1x.gz.xgl --rename /usr/share/man/man1/Xserver.1x.gz
   sudo apt-get -f install
  • Instead of messing with gdm.conf and gdm.conf-custom, we're going to do something better. 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
  • 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
  • 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. 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.
  • After all that, we are ready. Reboot your machine (yes, reboot) and when GDM loads, look at the sessions; if you see an "XGL" session there, everything's going according to plan. Load it up (make it your default session, if you want to), and hopefully everything will be working. We're half-way there anyway. All you need to do now, is open the System->Preferences->Sessions->Startup Programs and add the following:
   xmodmap /usr/share/xmodmap/xmodmap.us
   gnome-settings-daemon
   beryl-manager
   

Of course, if you are using a different locale, you can substitute xmodmap.us with your appropriate file.

  • Logout and login again. If everything is running along happily, you'll see the beryl splash screen, and the emerald-like icon of beryl in your tray. If beryl doesn't load initially, just right click the icon, and Select Window Manager->Beryl. Now right click the icon again, and load up Emerald (the window decorator) and choose the theme that you like best. You can also tinker with the settings at your heart's content.

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.


Has anyone got this working on feisty herd 4 ?[edit]

yes

yes: after first reboot no: since then. and yes: again then. you need to activate desktop effects in ubuntu. this does the job.

Feedback (7.04)[edit]

Newbie: The Part about the Session Manager is unclear and I think my error (the No above) is related to it.

Newbie: How can you prove if the installation has been done right to a certain extend? My Problem is, after the first reboot it worked. Then while starting over again it did not.

Newbie: How can I remove a compelte Sesssion so I am able to start over again?