Difference between revisions of "XGL-Ubuntu"

From cchtml.com
Jump to: navigation, search
(Xgl/Compiz on Ubuntu Dapper/Gnome - the Kombatant Way)
m (Reverted edits by 92.99.234.132 (talk) to last revision by Mooninite)
 
(29 intermediate revisions by 16 users not shown)
Line 1: Line 1:
== Xgl/Compiz on Ubuntu Dapper/Gnome - 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. 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). Your xorg.conf file doesn't need any special parametres - what I did was simply generate the default xorg.conf file with the command:
+
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.  
  
    sudo dpkg-reconfigure xserver-xorg
+
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!
  
and replace the "ati" instance with "fglrx". Nothing more.
 
 
* 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.
 
* 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.
  
     #compiz Quinn's
+
     #Beryl Repositories for Dapper Drake (Ubuntu 6.06)
     deb http://www.beerorkid.com/compiz dapper main
+
     deb http://ubuntu.beryl-project.org/ dapper main
     deb http://xgl.compiz.info/ dapper main
+
 
     deb-src http://xgl.compiz.info/ 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:
 
* After you add the repos in the sources.list file, issue the following commands:
  
     wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
+
     wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
  
 
     sudo apt-get update
 
     sudo apt-get update
  
     sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome
+
     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:
 
* 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:
Line 33: Line 48:
 
and add these as contents:
 
and add these as contents:
  
     Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
+
     Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer &  
    exec gnome-session
+
    sleep 2 && DISPLAY=:1 exec gnome-session
  
 
Save it, and then issue the command:
 
Save it, and then issue the command:
Line 48: Line 63:
 
     [Desktop Entry]
 
     [Desktop Entry]
 
     Encoding=UTF-8
 
     Encoding=UTF-8
     Name=XGl
+
     Name=XGL
 
     Exec=/usr/bin/startxgl.sh
 
     Exec=/usr/bin/startxgl.sh
 
     Icon=
 
     Icon=
 
     Type=Application
 
     Type=Application
  
* And again, from the terminal:
+
* 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.
  
    sudo gedit /usr/bin/startcompiz
+
* 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:
 
+
and inside it add the following:
+
 
+
    #!/bin/sh
+
    killall gnome-window-decorator
+
    wait
+
    gnome-window-decorator & DISPLAY=:1 LD_PRELOAD=/opt/mesa/libGL.so.1.2 compiz --replace gconf
+
 
+
and then from the command line
+
 
+
    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 reading and everything will be cleared
+
 
+
* 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.
+
 
+
* 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
+
 
+
If all the above didn't work, try this:
+
    sudo dpkg -i --force-overwrite /path/to/file/fglrxpackagefile.deb
+
 
+
This will surely overwrite mesa conflicting files with the fglrx files.
+
Source: http://ubuntuforums.org/showthread.php?t=22984&highlight=mesa+overwrite+fglrx
+
 
+
* 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 <language> refers to your country's code. For the US, it would be:
+
  
 
     xmodmap /usr/share/xmodmap/xmodmap.us
 
     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.
  
Or, of course, append it to the .gnomerc 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.
 
+
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.
 
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.
 
Any additional suggestions will be more than welcome.
 +
-----------------
  
 +
=== Has anyone got this working on feisty herd 4 ? ===
 +
yes
  
<<< The stuff about the mesa libs is not required.  Please check this link for an easier method, which WORKS: http://www.ubuntuforums.org/showthread.php?t=168618
+
yes: after first reboot
 
+
no: since then.
Main differences:
+
and yes: again then. you need to activate desktop effects in ubuntu. this does the job.
 
+
* startcompiz:
+
 
+
    killall gnome-window-decorator
+
    wait
+
    gnome-window-decorator & DISPLAY=:1
+
    compiz --replace gconf
+
    #fixes the shift-backspace bug
+
    xmodmap /usr/share/xmodmap/xmodmap.us
+
 
+
(us should be your countrycode)
+
 
+
    sudo apt-get install gset-compiz
+
 
+
(nice interface for plugins!!!)
+
 
+
* xorg.conf:
+
 
+
    Section "Device"
+
    Identifier "ATI Technologies, Inc. M24 1P [Radeon Mobility X600]"
+
      Driver "fglrx"
+
    BusID "PCI:1:0:0"
+
    Option "UseFBDev" "true"
+
    Option "OpenGLOverlay" "off" #this isn't necessary for me
+
    Option "UseInternalAGPGART" "no"
+
    Option "KernelModuleParm" "agplock=0" #Only necessary for X series ATI cards, or there is always hardware lockup after about 30 seconds
+
    EndSection
+
 
+
* Create a desktop script for easy startup of compiz after logging in:
+
 
+
    sudo gedit ~/Desktop/Compiz
+
 
+
    #!/bin/bash
+
    gnome-window-decorator &
+
    compiz --replace $1 gconf &
+
    xmodmap /usr/share/xmodmap/xmodmap.us #Substitute .us for your country code
+
  
    sudo chmod +x ~/Desktop/Compiz
+
=== Feedback (7.04) ===
 +
Newbie: The Part about the Session Manager is unclear and I think my error (the No above) is related to it.
  
Now, after choosing Xgl Session from gdm, and being logged in, just double-click the compiz icon and a new world opens!!!
+
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.
(click on http://en.opensuse.org/Compiz for a good manual by the makers of Compiz/Xgl)
+
  
[[Category:NeedsUpdating]]
+
Newbie: How can I remove a compelte Sesssion so I am able to start over again?

Latest revision as of 11: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?