Xgl

Differences between revisions 17 and 18
Revision 17 as of 2006-05-29 08:13:04
Size: 8349
Editor: 69-173-25-147
Comment: s/apt-get/aptitude/g
Revision 18 as of 2006-06-03 00:27:44
Size: 8882
Editor: dtm9-d9bfe175
Comment: cleaned up
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
 * ATI:  * '''ATI'''
Line 12: Line 12:
 * Nvidia:  * '''Nvidia'''
Line 14: Line 14:
 * Intel:  * '''Intel'''
Line 19: Line 19:
=== 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
=== 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:
{{{
Line 39: Line 27:
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: 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 Quinn''''''Storm's [http://www.beerorkid.com/compiz/quinn.key.asc gpg signature], import her key by typing the following command in a terminal:
Line 42: Line 32:
You will now be automatically informed of updates to Quinn''''''Storm's Compiz.
Line 48: Line 37:
Now we update the package list and do a dist-upgrade to make sure we get the latest mesa packages and such:

{{{$ sudo aptitude update
$ sudo aptitude dist-upgrade}}}

----
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.

----

Line 56: Line 49:
Line 62: Line 56:
A web-view of the CVS can be found [http://metascape.afraid.org:13666/cgi-bin/viewcvs.cgi/compiz/ here].
(!)
A web-view of the CVS can be found [http://metascape.afraid.org:13666/cgi-bin/viewcvs.cgi/compiz/ here].
Line 70: Line 65:
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:{{{
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:
 
{{{
Line 75: Line 71:
And if you have ATI type:{{{  * If you have ATI type:
 
{{{
Line 78: Line 75:
Now to install the Xgl :{{{  * Now to install the Xgl server:
 
{{{
Line 92: Line 90:
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:{{{ 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){{{
Line 106: Line 104:
Go to the section 'device' and change the driver to 'nvidia', enable Render Acceleration and allow GLX with Composite, like this:{{{ Go to the "Device" section and change the driver to "nvidia":{{{
Line 110: Line 108:
 Option "RenderAccel" "true"
 Option "AllowGLXWithComposite" "true"
Line 114: Line 110:
<!> The Identifier will probably look different according to your graphics card and hardware setup (don't change it).

<!> There may be a BusID section, just leave it.
(!) The Identifier will probably look different according to your graphics card and hardware setup (don't change it).

(!) There may be a BusID and other parameters in this "Device" section; they won't need to be changed.
Line 124: Line 120:
''(ATI driver to be added)''

<!> Take a look at [wiki:BinaryDriverHowto/ATI Binary Driver Howto for ATI], thank you.
'''(ATI driver config to be added)'''

(!) For now, take a look at [wiki:BinaryDriverHowto/ATI Binary Driver Howto for ATI].
Line 133: Line 129:
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. KDE Users should use method A, GNOME users may choose either.  KDE users should replace any instance of the words "gnome-session" with "startkde".
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.

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

----
Line 138: Line 137:
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:
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:
Line 145: Line 145:
<!> 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

<!> KD
E users replace gnome-session with startkde

{{{
#!/bin/bash    Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 gnome-session
}}}

 * ATI users: Type in

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

 * Save this file, and close it.
(!) 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.


||<tablestyle="font-size: 0.9em; width:95%; background:#F1F1ED; margin: 0 0 1em 1em; padding:0.5em"> '''
Nvidia (using GNOME)''' || #!/bin/bash [[BR]]Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 gnome-session ||
|| '''Nvidia (using KDE)''' || #!/bin/bash [[BR]]Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 startkde ||
|| '''ATI (using GNOME)''' || #!/bin/bash [[BR]]Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
gnome-session ||
|| '''ATI (using KDE)''' || #!/bin/bash [[BR]]Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1 startkde ||



* Save this file, and close the editor.
Line 171: Line 161:
 * 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:  * 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:
Line 187: Line 177:
 * Save this file and close it.


<!> Note for non-English layout key add xmodmap /usr/share/xmodmap/xmodmap.[lang] in your session.
 * Save this file and close the editor.
Line 192: Line 179:
 * 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, it will ask you if you want to make this session the default session. For now, choose "Just for this session".   <!> Finish the rest of the walkthrough before attempting this!

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

----
 * 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".

(
!) 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.


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

----

Line 207: Line 197:
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:{{{
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:{{{
Line 214: Line 202:

Line 215: Line 205:
Make the last part of the file look like this:{{{
Add a new [server-Xgl] section and change the [servers] section to look like this:{{{
Line 226: Line 217:
Line 227: Line 219:
Make the last part of the file look like this:{{{
Add a new [server-Xgl] section and change the [servers] section to look like this:{{{
Line 237: Line 230:

----
Line 238: Line 234:
Make the last part of the file look like this:{{{
Add a new [server-Xgl] section and change the [servers] section to look like this:{{{
Line 247: Line 244:
----

=== Xgl Installed! ===
Now we must move on to installing Compiz.


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


== Xgl Installed! ==

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

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 :1 -ac -br -accel glx:pbuffer -accel xv:fbo & sleep 2 && DISPLAY=:1 gnome-session

Nvidia (using KDE)

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

ATI (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 [: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


If you have ATI

Add a new [server-Xgl] section and change the [servers] section to 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

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

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