Xgl

Differences between revisions 11 and 12
Revision 11 as of 2006-05-28 22:21:47
Size: 8157
Editor: 158
Comment:
Revision 12 as of 2006-05-28 22:23:29
Size: 8161
Editor: 158
Comment:
Deletions are marked like this. Additions are marked like this.
Line 196: Line 196:
<!> Finish the rest of the walkthrough before attempting this!
Line 197: Line 199:
<!> Finish the rest of the walkthrough before attempting this!

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

Seting Up Apt

Make sure that you have the proper repositories configured. Open a terminal and type

$ sudo gedit /etc/apt/sources.list

Make sure it contains the following lines:

deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse

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

The packages in Quinn's 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 -}}} You will now be automatically informed of updates to QuinnStorm's Compiz.

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 we 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}}}


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

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 (actually there are more packages but these two take care of all the dependencies). If you have a NVIDIA graphics card you'll also need the nvidia-glx package. If you own an ATI card you'll probably need the xorg-driver-fglrx package.

So, if you use NVIDIA first do:

$ sudo apt-get install nvidia-glx

And if you have ATI type:

$ sudo apt-get install xorg-driver-fglrx

Now to install the Xgl :

$ sudo apt-get 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 section 'module', comment out 'GLcore' and 'dri' with an '#' (if they exist) and add 'glx' (if it isn't there yet), like this:

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 section 'device' and change the driver to 'nvidia', enable Render Acceleration and allow GLX with Composite, like this:

Section "Device"
        Identifier      "NVIDIA GeForce FX 5200"
        Driver          "nvidia"
        Option          "RenderAccel"           "true"
        Option          "AllowGLXWithComposite" "true"
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 section, just leave it.

That's it.


If you have ATI

(ATI driver to be added)

Info <!> Take a look at [wiki:BinaryDriverHowto/ATI Binary Driver Howto for ATI], thank you.

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 the session, and go back to the regular X server. This will help in troubleshooting.

Method A: Xgl session

Having a standalone session as an option will allow the user to revert to the normal X server instantly, as no editing existing files are needed. This is the safest route because there is no need to revert anything if it doesn't work:

  • We will need to create two new files. 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 users: Inside this document, type in

Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 gnome-session 
  • ATI users: Type in

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 gnome-session 
  • Save this file, and close it.
  • 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 desktop file using the following code:

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

[Desktop Entry]  
Encoding=UTF-8 
Name=Xgl-Gnome
Comment=Start an Xgl-Gnome Session
Exec=/usr/bin/startxgl.sh 
Icon= 
Type=Application 
  • Save this file and close it.

Info <!> Note for non-English layout key add xmodmap /usr/share/xmodmap/xmodmap.[lang] in your session.

  • To log into Xgl, logout of your current session, and from the login screen click "Options" and "Session chooser"
  • Select "Xgl-Gnome" from the Session menu
  • When you login, it will ask you if you want to make this session the default session. For now, choose "Just for this session".

Info <!> Finish the rest of the walkthrough before attempting this!

For further information you may look at ["/NestedXgl"]


Method B: Replace Xorg with Xgl

Another way to run Xgl & compiz involves replacing the standard X server (Xorg) with Xgl.

Configure Gnome Display Manager

Now we configure the Gnome Display Manager. In the terminal type:

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

If you have NVIDIA

Make the last part of the file 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


If you have ATI

Make the last part of the file look like this:

[servers]
0=inactive
1=Xgl

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

Else

Make the last part of the file 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!

Now we must move on to installing Compiz.

Please move on to [:CompositeManager/InstallingCompiz:Installing Compiz]


CategoryDocumentation

CompositeManager/Xgl (last edited 2008-08-06 17:00:59 by localhost)