HOWTO (incomplete): Compile Xgl from the freedesktop.org CVS to run with your current Xorg libraries.
This is my first ever howto, so any feedback will be welcome.
This was not done on a clean Ubuntu install. I am busy installing Ubuntu Breezy in VMWare to set it all up there, then I should have all the deps listed here.
------------------------
First, in order to build xserver, you are going to need the following dependencies:
Code:
build-essential
m4
autoconf
automake-1.9
autotools-dev
libtool
libx11-dev
libxau-dev
libxext-dev
libxi-dev
libxfont1
x11proto-core-dev
x11proto-input-dev
x11proto-kb-dev
x11proto-xext-dev
x11proto-randr-dev
x11proto-render-dev
x11proto-fixes-dev
x11proto-damage-dev
x11proto-fonts-dev
x11proto-composite-dev
x11proto-resource-dev
x11proto-record-dev
x11proto-bigreqs-dev
x11proto-xcmisc-dev
x11proto-video-dev
x11proto-scrnsaver-dev
x11proto-gl-dev
x11proto-trap-dev
x11proto-xinerama-dev
libxfont-dev
xtrans-dev
libxrandr-dev
libxrender-dev
libxfixes-dev
libxdamage-dev
libxext-dev
libxres-dev
libxdmcp-dev
libfreetype6-dev
zlib1g-dev
libgl1-mesa-dev
I am not sure if this list is complete, or if there are unrequired deps on there. As I said, I am not currently on a clean system, but I am bust setting one up. I'll update the list as soon as I can.
You should be able to install all of this by running the command
Code:
sudo apt-get install build-essential m4 autoconf automake-1.9 autotools-dev libtool libx11-dev libxau-dev libxext-dev libxi-dev libxfont1 x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev x11proto-randr-dev x11proto-render-dev x11proto-fixes-dev x11proto-damage-dev x11proto-fonts-dev x11proto-composite-dev x11proto-resource-dev x11proto-record-dev x11proto-bigreqs-dev x11proto-xcmisc-dev x11proto-video-dev x11proto-scrnsaver-dev x11proto-gl-dev x11proto-trap-dev x11proto-xinerama-dev libxfont-dev xtrans-dev libxrandr-dev libxrender-dev libxfixes-dev libxdamage-dev libxext-dev libxres-dev libxdmcp-dev libfreetype6-dev zlib1g-dev libgl1-mesa-dev
If you require deps not listed there, post the error here and I will tell you what to get. Or, if you know what you need, just post the dep here.
The next requirement is a package called glitz. The version in the breezy repos is too old, so we need to fetch the CVS source from freedesktop.org and build that:
Code:
$ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo co glitz glitzinfo
$ cd glitz
$ ./autogen.sh
$ make
$ sudo make install
$ cd ../glitzinfo
$ make -f Makefile.glx
$ ./glitzinfo
$ cd ..
Run glitzinfo. Its not required by anything, but it gives you info on available features:
glitzinfo should report some info about available features, drawable formats and surface formats. The following set of features are important and if one of them is missing it is likely that it will give you performance problems.
Code:
texture rectangle
texture border clamp
multitexture
texture environment combine
Now we can start with the actual xserver package that provides Xgl. Again we fetch the source from freedesktop.org CVS:
Code:
$ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xserver co xserver
$ cd xserver
$ ./autogen.sh --enable-xglserver --enable-xglxserver
$ make
NOTE: There is no "sudo make install" because if you install this, it will most probably break the xserver from the breezy repos, stopping your normal X from running.
You can give autogen.sh the "--prefix=/some/path" flag, which will make the "sudo make install" command install it to the location "/some/path". I have not done this on my machine. If you try this, make sure that the path does not conflict with installed software (i.e. try "/opt/xglserver")
If it built without any problems, there will be a binary called "Xglx" in the "hw/xgl/glx" subdirectory of xserver. Go to that directory and run Xglx with the following command:
Code:
$ cd hw/xgl/glx
$ ./Xglx :1 -ac -nolisten tcp -screen 1024x768
The "-ac" flag disables access control (otherwise clients will not be able to connect to the Xglx server at all because the access control is normally set up by scripts such as startx). The "-nolisten tcp" flag offsets this security hazard by not allowing remote connections.
To change the resolution the Xglx server runs at, simply change the "1024x768" after "-screen" to your required resolution.
I don't think I have hardware acceleration correctly enabled. When I try the autogen.sh flag "--enable-glx" (which I did not include above), I get an error when I compile, saying that the file "glcore.h" cannot be found, and I have not managed to fix that yet. If anybody can help, it will be greatly appreciated by everybody, I'm sure.
You can then start up a gnome desktop (or something) in there like so
Code:
$ export DISPLAY=:1
$ nautilus &
$ metacity &
$ xcompmgr &
$ transset &
$ gnome-panel &
$ gnome-settings-daemon &
I am not sure the xcompmgr plays nicely with Xglx, and I have not managed to compile glxcompmgr yet (I get the same cannot find "glcore.h" error when compiling).
In theory you now have Xglx running in a window.
I hope at least somebody finds this guide useful...
Please let me know what I can improve.
ADDED:
I have just finished setting up the clean system. Now to start getting everything....
ADDED:
I have updated the dependecy list for building --enable-xglserver
I have not got a list of all the deps for building --enable-xglxserver (I have only been able to do that on a non-clean system (owing to the fact that my clean system is a virtual machine without a 3d-card)
I have corrected a few negligent and inexcusable errors in my original post
Bookmarks