X.org CVS HOWTO
Here's a quick guide for people who fancy trying out the new X.org with true transparency and drop shadows etc. It can also be used to give you a very basic idea of how to use CVS in general.
DISCLAIMER
Using unstable software, especially for something as important as your X server, can screw things up. A lot. If you can't afford the possibility that your computer may get completely hosed, this is not for you. If you can't afford the possibility that you might need to reinstall your old X server from a text console, this is not for you. If you are faint of heart or have a weak constitution, this is not for you. Having said that, if you enjoy trying out the newest stuff and don't mind having to pick up the pieces again afterwards if things go wrong, then this is exactly what you've been looking for.
Requirements
You will need the following software installed on your machine:
First things first
First of all you need somewhere to download the source you'll be getting from CVS. It'll be pretty large, a few hundred megs I think. Decide where you're going to put it, open up a terminal, and lets go:
This will ask you for a password - just press return. This logs your machine on to the anonymous CVS server at freedesktop.org.
This is the big step. The co near the end of that command means checkout, and the -P xc tells it to get the xorg composite source and put it in a directory called xc (one will be created if it doesn't exist) so that will checkout the whole Xorg source tree onto your machine.
That will take a while. Browse neowin some more, watch a film, go for a walk, make a cup of tea, etc. The next part is when we start getting serious...
So you wanna make it in this world, eh kiddo...?
After its all been checked out, run
Which will compile the whole shebang. Again, find something to do in the meantime. Depending on your machine, this can take a while. It took my computer (Athlon 2500+ clocked as a 3200+ w/ 1gig ram) about forty minutes to compile.
Next, we need to install this monstrosity. As root now, run
And watch with trepidation as your computer chugs away shoving the files where they need to go. This shouldn't take too long in theory, but I have heard reports of it taking even longer than the compile on some people's machines! (It took me just a few minutes).
A quick note: from this point on, you may notice strange behaviour with some aspects of your GUI until the end of the process. This is because the libraries which were being used for stuff like window creation and rendering etc are now being overwritten with different versions, and any behaviour is going to be unpredictable. What happened for me was that I wasn't able to create any new windows until I'd finished the install and restarted X.
Final steps
Now you have to edit your /etc/X11/xorg.conf file, or if you're upgrading from XFree86, you should copy your /etc/X11/XF86Config (or /etc/X11/XF86Config-4) to /etc/X11/xorg.conf and edit that. You need to change the keyboard driver entry from
to
because the old keyboard driver no longer works. If you want to enable the composite extension to give yourself true transparency and drop shadows etc (and you probably do, because thats the whole point to this exercise
) then you also need to add a new section to the file somewhere:
That will make sure the composite extension is loaded when you next start X.
Now, you've got the new X.org installed, but you won't be able to do anything with it (in terms of transparency and drop shadows) unless you get a composite manager installed. There are a couple of choices here - you can either compile one of the recent builds of the Metacity window manager, which in theory automatically checks for the composite extension during the configure phase and enables a built-in composite manager, or you can simply install the xcompmgr program from the same ol' freedesktop.org CVS server. I chose the latter, because I don't have gnome installed and I really don't want to use metacity as my window manager, and its also a lot quicker than compiling the whole of metacity. Here's how to install the xcompmgr:
That will get xcompmgr installed for you.
Now the very last thing you need to get is a little app called transset, which you run then click on a window to make it transparent. You can grab that from the same CVS server, too (how convenient!). Note: I'm skipping the CVS login step here, because you should still be logged into the /cvs/xapps tree of the CVS server from when you grabbed xcompmgr. First go back out of the xcompmgr source directory:
Now transset doesn't have make rules for make install, all it does is create an executable binary called transset. You can either run that from where it is, or copy it somewhere in your path (/usr/bin/ for example) so that you can run it from anywhere.
Getting it going
Now all that remains is for you to exit your X server (if you were even still in one at this stage anyway) and give
a try. If you come up into the X environment, congratulations, you just won yourself a cookie. From here, start up an xterm or something and run
The -c on the end tells xcompmgr to fire up the composite goodness. This should either bring beautiful eye-candy to your desktop, or crash and burn completely. It's pretty much a fifty-fifty chance
If you get xcompmgr to work (you'll notice it when it does work: there'll be drop shadows all over the shop) you can now move on to transparency. Run
and when the changed mouse cursor comes up, click on a window. The window should be turned 50% transparent. You can vary the number you give to transset to vary the transparency. 0=fully transparent, 1=fully opaque.
And there you have it, eye-candy ahoy. It takes a while, but its quite satisfying when it all works properly.
Troubleshooting
If you are having problems getting this to work, here are a couple of ideas to try.
First off, try running xcompmgr as root. It certainly made the eye-candy more stable on my box, but YMMV.
Next, if transparency settings aren't applying properly, you can kill xcompmgr and run it again. This should catch the transparency settings and apply them properly.
You might need to reinstall / recompile your graphics card drivers after installing, too. I had to emerge nvidia-kernel again on my gentoo setup.
For Nvidia users: It might be a good idea to enable the experimental RenderAccel support in the driver. To do this, add the following to your device section of your xorg.conf:
For more information on this, see the Nvidia linux drivers README.
Known bugs
Lots. This is extremely experimental and will most likely crash your X server one or more times. Some of these crashes can only be fixed by SSHing into the box from another machine to nuke the offending process, so if you don't have another machine to connect to your non-responsive box from, you might have to hard-reset it, which is always bad.
There are plenty of rendering bugs with xcompmgr running, too. The text on my fluxbox menu gets screwed up, pixmap themes for any window manager will likely look wrong, and various other little annoyances and discrepancies will show up. You decide for yourself if the transparency and shadows are worth these problems and instability. If you don't want to risk it, you can always wait for the next stable release of X.org, which may or may not have ironed out these problems.
Good luck and happy compositing!
Updating
OK, its all well and good getting a CVS build of it up and running, but CVS is a moving target. You have to stay on your toes if you want to keep up with the latest code versions. Luckily, its not too hard to keep synchronized with the latest changes with CVS, so if you want to update your build, here's what you do.
First off, change to the Xorg source directory, and login to the CVS server again:
Next comes the updating part. This just compares the local source tree to the one in CVS, and makes any changes necessary:
After that, all we need to do next is recompile and install over the last version:
Restart X, and you're done!
EDITED to add requirements and information for nvidia users.
EDITED2 some minor CVS changes
EDITED3 added Updating section
Here's a quick guide for people who fancy trying out the new X.org with true transparency and drop shadows etc. It can also be used to give you a very basic idea of how to use CVS in general.
DISCLAIMER
Using unstable software, especially for something as important as your X server, can screw things up. A lot. If you can't afford the possibility that your computer may get completely hosed, this is not for you. If you can't afford the possibility that you might need to reinstall your old X server from a text console, this is not for you. If you are faint of heart or have a weak constitution, this is not for you. Having said that, if you enjoy trying out the newest stuff and don't mind having to pick up the pieces again afterwards if things go wrong, then this is exactly what you've been looking for.
Requirements
You will need the following software installed on your machine:
- cvs
- gcc
- possibly automake and autoconf
First things first
First of all you need somewhere to download the source you'll be getting from CVS. It'll be pretty large, a few hundred megs I think. Decide where you're going to put it, open up a terminal, and lets go:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login
This will ask you for a password - just press return. This logs your machine on to the anonymous CVS server at freedesktop.org.
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co -P xc
This is the big step. The co near the end of that command means checkout, and the -P xc tells it to get the xorg composite source and put it in a directory called xc (one will be created if it doesn't exist) so that will checkout the whole Xorg source tree onto your machine.
That will take a while. Browse neowin some more, watch a film, go for a walk, make a cup of tea, etc. The next part is when we start getting serious...
So you wanna make it in this world, eh kiddo...?
After its all been checked out, run
cd xc make World
Which will compile the whole shebang. Again, find something to do in the meantime. Depending on your machine, this can take a while. It took my computer (Athlon 2500+ clocked as a 3200+ w/ 1gig ram) about forty minutes to compile.
Next, we need to install this monstrosity. As root now, run
make install
And watch with trepidation as your computer chugs away shoving the files where they need to go. This shouldn't take too long in theory, but I have heard reports of it taking even longer than the compile on some people's machines! (It took me just a few minutes).
A quick note: from this point on, you may notice strange behaviour with some aspects of your GUI until the end of the process. This is because the libraries which were being used for stuff like window creation and rendering etc are now being overwritten with different versions, and any behaviour is going to be unpredictable. What happened for me was that I wasn't able to create any new windows until I'd finished the install and restarted X.
Final steps
Now you have to edit your /etc/X11/xorg.conf file, or if you're upgrading from XFree86, you should copy your /etc/X11/XF86Config (or /etc/X11/XF86Config-4) to /etc/X11/xorg.conf and edit that. You need to change the keyboard driver entry from
Section "InputDevice" Identifier "Keyboard0" Driver "Keyboard"
to
Section "InputDevice" Identifier "Keyboard0" Driver "kbd"
because the old keyboard driver no longer works. If you want to enable the composite extension to give yourself true transparency and drop shadows etc (and you probably do, because thats the whole point to this exercise
Section "Extensions" Option "Composite" "Enable" EndSection
That will make sure the composite extension is loaded when you next start X.
Now, you've got the new X.org installed, but you won't be able to do anything with it (in terms of transparency and drop shadows) unless you get a composite manager installed. There are a couple of choices here - you can either compile one of the recent builds of the Metacity window manager, which in theory automatically checks for the composite extension during the configure phase and enables a built-in composite manager, or you can simply install the xcompmgr program from the same ol' freedesktop.org CVS server. I chose the latter, because I don't have gnome installed and I really don't want to use metacity as my window manager, and its also a lot quicker than compiling the whole of metacity. Here's how to install the xcompmgr:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps login (press return at the password prompt) cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/xapps co xcompmgr cd xcompmgr export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig ./autogen.sh ./configure --prefix=/usr make make install
That will get xcompmgr installed for you.
Now the very last thing you need to get is a little app called transset, which you run then click on a window to make it transparent. You can grab that from the same CVS server, too (how convenient!). Note: I'm skipping the CVS login step here, because you should still be logged into the /cvs/xapps tree of the CVS server from when you grabbed xcompmgr. First go back out of the xcompmgr source directory:
cd .. cvs -d:pserver:anoncvs@freedesktop.org:/cvs/xapps co transset cd transset make
Now transset doesn't have make rules for make install, all it does is create an executable binary called transset. You can either run that from where it is, or copy it somewhere in your path (/usr/bin/ for example) so that you can run it from anywhere.
Getting it going
Now all that remains is for you to exit your X server (if you were even still in one at this stage anyway) and give
startx
a try. If you come up into the X environment, congratulations, you just won yourself a cookie. From here, start up an xterm or something and run
xcompmgr -c
The -c on the end tells xcompmgr to fire up the composite goodness. This should either bring beautiful eye-candy to your desktop, or crash and burn completely. It's pretty much a fifty-fifty chance
If you get xcompmgr to work (you'll notice it when it does work: there'll be drop shadows all over the shop) you can now move on to transparency. Run
transset .5
and when the changed mouse cursor comes up, click on a window. The window should be turned 50% transparent. You can vary the number you give to transset to vary the transparency. 0=fully transparent, 1=fully opaque.
And there you have it, eye-candy ahoy. It takes a while, but its quite satisfying when it all works properly.
Troubleshooting
If you are having problems getting this to work, here are a couple of ideas to try.
First off, try running xcompmgr as root. It certainly made the eye-candy more stable on my box, but YMMV.
Next, if transparency settings aren't applying properly, you can kill xcompmgr and run it again. This should catch the transparency settings and apply them properly.
You might need to reinstall / recompile your graphics card drivers after installing, too. I had to emerge nvidia-kernel again on my gentoo setup.
For Nvidia users: It might be a good idea to enable the experimental RenderAccel support in the driver. To do this, add the following to your device section of your xorg.conf:
Option "RenderAccel" "true"
For more information on this, see the Nvidia linux drivers README.
Known bugs
Lots. This is extremely experimental and will most likely crash your X server one or more times. Some of these crashes can only be fixed by SSHing into the box from another machine to nuke the offending process, so if you don't have another machine to connect to your non-responsive box from, you might have to hard-reset it, which is always bad.
There are plenty of rendering bugs with xcompmgr running, too. The text on my fluxbox menu gets screwed up, pixmap themes for any window manager will likely look wrong, and various other little annoyances and discrepancies will show up. You decide for yourself if the transparency and shadows are worth these problems and instability. If you don't want to risk it, you can always wait for the next stable release of X.org, which may or may not have ironed out these problems.
Good luck and happy compositing!
Updating
OK, its all well and good getting a CVS build of it up and running, but CVS is a moving target. You have to stay on your toes if you want to keep up with the latest code versions. Luckily, its not too hard to keep synchronized with the latest changes with CVS, so if you want to update your build, here's what you do.
First off, change to the Xorg source directory, and login to the CVS server again:
cd xc cvs -d:pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login
Next comes the updating part. This just compares the local source tree to the one in CVS, and makes any changes necessary:
cvs -d:pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg update -Pd
After that, all we need to do next is recompile and install over the last version:
make World make install
Restart X, and you're done!
EDITED to add requirements and information for nvidia users.
EDITED2 some minor CVS changes
EDITED3 added Updating section
This post has been edited by rezza: 08 September 2004 - 14:50


Share 
This topic is locked
rezza
MultiQuote






