Xgl

Revision 24 as of 2006-06-15 02:52:20

Clear message

Introduction

This page details how to install Xgl on your system.

Supported Hardware

  • ATI

    • Mobility Radeon 9700 SE: Xgl running with proprietary fglrx driver 8.23
    • Radeon X300: Xgl running with proprietary fglrx driver 8.23
  • Nvidia

    • All Nvidia cards after 4xxx series work with "nvidia" driver.
  • Intel

    • i9xx

Setting up repositories

Using Apt

Make sure that you have the proper repositories configured. You need the Universe and Multiverse repositories as well as either one of the following two non-Ubuntu repositories:

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

If you need help with adding repositories, please see AddingRepositoriesHowto.

The packages in Quinn's [http://beerorkid.com/compiz/ compiz repositories] can be gpg authenticated. If you want to be able to check the packages against QuinnStorm's [http://www.beerorkid.com/compiz/quinn.key.asc gpg signature], import her key by typing the following command in a terminal: {{{gpg --keyserver subkeys.pgp.net --recv-keys 0x31a5f97fed8a569e gpg --export --armor 0x31a5f97fed8a569e | sudo apt-key add -}}}

Info <!> If you do not import the pgp key, you will receive an error message "The integrity of the packages cannot be verified".

(./) For more on secure apt, see [http://wiki.debian.org/SecureApt Secure Apt] on the Debian wiki.

Now update the package list and do a dist-upgrade to make sure we get the latest mesa packages and such:

{{{$ sudo apt-get update $ sudo apt-get dist-upgrade}}}

Update-Manager will now inform you about updates to the compiz repositories.


Optionally: CVS repository

QuinnStorm provides access to the CVS repository for those who wish to have the absolute latest code.

cvs -d:pserver:anonymous@metascape.afraid.org:/cvsroot login
password: ''leave blank''
cvs -d:pserver:anonymous@metascape.afraid.org:/cvsroot co compiz

Info (!) A web-view of the CVS can be found [http://metascape.afraid.org:13666/cgi-bin/viewcvs.cgi/compiz/ here].

Selecting Xgl packages

The packages we need are xserver-xgl and the proprietary graphics drivers for your graphics card. If you have a NVIDIA graphics card you'll want the nvidia-glx package; if you use an ATI card you'll probably need the xorg-driver-fglrx package.

  • If you use NVIDIA invoke:
    $ sudo aptitude install nvidia-glx
  • If you have ATI type:
    $ sudo aptitude install xorg-driver-fglrx
  • Now to install the Xgl server:
    $ sudo aptitude install xserver-xgl

Configure X.org

If you use NVIDIA or ATI you'll need to edit your X.org configuration.

Open the X.org configuration file:

sudo gedit /etc/X11/xorg.conf

If you have Nvidia

Go the "Module" section, comment out the "GLcore" and "dri" modules (if they are enumerated) and add the "glx" module (if it isn't there yet)

Section "Module"
#       Load    "GLcore"
        Load    "bitmap"
        Load    "ddc"
#       Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "type1"
        Load    "vbe"
EndSection

Go to the "Device" section and change the driver to "nvidia":

Section "Device"
        Identifier      "NVIDIA GeForce FX 5200"
        Driver          "nvidia"
EndSection

Info (!) The Identifier will probably look different according to your graphics card and hardware setup (don't change it).

Info (!) There may be a BusID and other parameters in this "Device" section; they won't need to be changed.

That's it.


If you have ATI

(ATI driver config to be added)

Info (!) For now, take a look at [wiki:BinaryDriverHowto/ATI Binary Driver Howto for ATI].

Configuring the environment

There are multiple ways to run Xgl. You may first want to test everything works before making Xgl and compiz your default configuration. One way to do this is to run Xgl as a session inside of an existing X windows session. Short of a hard lock, you can terminate that session and continue using the regular X server. This will help in troubleshooting.

Info (!) KDE Users should use method A, GNOME users may choose either.


Method A: Xgl session

Having a standalone Xgl session as an option at the login screen will allow the user to revert to the standard X.org server instantly. The Xgl server starts on top of the Xorg server instead of replacing it as the standard server used by gdm, the gnome display manager. This is perhaps the most convenient route because there is no need to revert anything if it doesn't work.

  • We will need to create two new files: a startup script and an X session file.

Open up a terminal and create a new script named startxgl.sh:

sudo gedit /usr/bin/startxgl.sh

Info (!) Note that /usr/bin is the place where most of the system's binaries get installed; /usr/local/bin or ~/bin are usually regarded as better places for locally installed and administered software. If you decide to create your script in one of these places be aware that you may need to create the directories as well. Don't forget to change the script's location accordingly throughout the tutorial.

Nvidia (using GNOME)

#!/bin/bash BRXgl -fullscreen :0 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:0 gnome-session

Nvidia (using KDE)

#!/bin/bash BRXgl -fullscreen :0 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:0 startkde

ATI and i9xx(using GNOME)

#!/bin/bash BRXgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 gnome-session

ATI (using KDE)

#!/bin/bash BRXgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 startkde

  • Save this file, and close the editor.
  • Make the script executable with the following command:

sudo chmod +x /usr/bin/startxgl.sh
  • Now we'll add an option to the gnome login manager so that we can choose to log into our new Xgl-gnome session. Create an Xsession file like so:

sudo gedit /usr/share/xsessions/xgl.desktop 
  • In this file, paste the following:

[Desktop Entry]  
Encoding=UTF-8 
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/bin/startxgl.sh 
Icon= 
Type=Application 
  • Save this file and close the editor.
  • To log into Xgl, logout of your current session, and from the login screen click "Options" and "Session chooser".
  • Select "Xgl" from the Session menu.
  • When you login, gdm will ask if you would like to make the "Xgl" session the default session. For now, choose "Just for this session".

Info (!) When your Xgl desktop appears for the first time, gnome may ask you about your keyboard localization preference. Choose "Use Gnome keyboard localization" to continue using your usual keyboard settings.

Info (!) For further information consult the [:CompositeManager/Xgl/NestedXgl: Nested Xgl page].


Method B: Replace Xorg with Xgl

Another way to run Xgl & compiz involves replacing Xorg with Xgl as the standard X server for use with gdm, the gnome display manager. Xgl will not run on top of Xorg using this procedure, which may be desirable if Xorg is not being used at all. Switching between X servers will not be as simple as logging out and back in again though; it will require a little bit of file editing instead.

We'll configure the gnome display manager. In the terminal type:

$ sudo gedit /etc/gdm/gdm.conf-custom

If you have NVIDIA

Add a new [server-Xgl] section and change the [servers] section to look like this:

[servers]
0=Xgl

[server-Xgl] 
name=Xgl server 
command=/usr/bin/Xgl :0 -fullscreen -ac -br -accel xv:fbo -accel glx:pbuffer -kb
flexible=true

(Why "-kb"? That gives me XKB errors! -- MikaelNilsson)


If you have ATI

Add a new [server-Xgl] section and change the [servers] section to look like this:

[servers]
0=Xgl

[server-Xgl] 
name=Xgl server 
command=/usr/bin/Xgl :0 -fullscreen -ac -accel xv:fbo -accel glx:pbuffer -xorgAc
flexible=true

---

Else

Add a new [server-Xgl] section and change the [servers] section to look like this:

[servers]
0=Xgl

[server-Xgl] 
name=Xgl server 
command=/usr/bin/Xgl :0 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer
flexible=true

Xgl Installed!

Let's move on to [:CompositeManager/InstallingCompiz:Installing Compiz!]


CategoryDocumentation