%general-entities; ]> $LastChangedBy$ $Date$ Xorg-&xorg7-version; Xorg Introduction to Xorg Xorg is a freely redistributable, open-source implementation of the X Window System. This system provides a client/server interface between display hardware (the mouse, keyboard, and video displays) and the desktop environment, while also providing both the windowing infrastructure and a standardized application interface (API). Xorg Dependencies Required , , , and . Optional . Xorg Download and Installation Instructions With the modular build system, it is no longer possible to download the entire package in a single file. In fact, there may be as many as 200 files that need to be fetched from the download location. To assist with such a large task, it is strongly recommended to install for downloading the needed files. A complete wget script is available for each section at . Given the number of packages available, deciding which packages you need to install for your particular setup may seem a bit overwhelming at first. Take a look at this thread to get an idea of what you will need. If you are unsure, simply install all packages at the cost of extra diskspace. Additionally, because of the large number of repetitive commands, you are encouraged to script the build. For most sections, you can use the following commands to compile and install all packages in your build directory: for package in *.tar.bz2 do packagedir=`echo $package | sed 's/.tar.bz2//'` tar -xf $package && cd $packagedir && ./configure $XORG_CONFIG && make && make install if [ $? -ne 0 ]; then break #stop the build if the previous command failed fi cd .. && rm -rf $packagedir done 2>&1 | tee -a ../xorg-compile.log #log the entire loop Setting up the Xorg Build Environment First, you'll need to create a working directory: mkdir xc && cd xc As with previous releases of the X Windows System, it may be desirable to install Xorg into an alternate prefix. This is no longer common practice among linux distributions. The common installation prefix for Xorg on linux is /usr. There is no standard alternate prefix, nor is there any exception in the current revision of the Filesystem Hierarchy Standard for Release 7 of the X Windows System. Alan Coopersmith of Sun Microsystems, has recently stated "At Sun, we were using /usr/X11 and plan to stick with it." Only the /opt/* prefix or the /usr prefix adhere to the current FHS guidelines. Choose your installation prefix, and set the XORG_PREFIX variable with the following command: export XORG_PREFIX="[/usr]" Throughout these instructions, you will use the same three configure switches for all of the packages. Create the XORG_CONFIG variable to use for substitution: export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var" Xorg Protocol Headers Xorg Protocol Headers The Xorg protocol headers provide the header files required to build the system, and to allow other applications to build against the installed X Window system. Xorg Proto packages can be downloaded individually from . Installation of Xorg Protocol Headers Install the Xorg protocol headers by running the following commands for each package to be installed. ./configure $XORG_CONFIG && make Now as the root user: make install Xorg Utilities Xorg Utilities The Xorg utility packages provide needed utilities, not for the Xorg installation itself, but for other applications that make use of legacy X11R6 installation methods. Xorg Utility packages can be downloaded individually from . Installation of Xorg Utilities Install first, the xorg-cf-files package with the following commands: sed -i "s@/usr/X11R6@$XORG_PREFIX@" site.def && sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config && make Now as the root user: make install Next, install the Imake package with these commands: ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config && make Now as the root user: make install Finally, build the three remaining packages with the standard build commands: ./configure $XORG_CONFIG && make Now as the root user: make install Xorg Libraries Xorg Libraries The Xorg libraries provide library routines that are used within all X Window applications. Xorg Library packages can be downloaded individually from . Meeting Library Dependencies These 17 libraries are a core part of the X Windows System and must be built in the order provided: xtrans-X11R7.0-1.0.0.tar.bz2 libXau-X11R7.0-1.0.0.tar.bz2 libXdmcp-X11R7.0-1.0.0.tar.bz2 libX11-X11R7.0-1.0.0.tar.bz2 libXext-X11R7.0-1.0.0.tar.bz2 libICE-X11R7.0-1.0.0.tar.bz2 libSM-X11R7.0-1.0.0.tar.bz2 libXt-X11R7.0-1.0.0.tar.bz2 libXmu-X11R7.0-1.0.0.tar.bz2 libXpm-X11R7.0-3.5.4.2.tar.bz2 libXp-X11R7.0-1.0.0.tar.bz2 libXfixes-X11R7.0-3.0.1.2.tar.bz2 libXrender-X11R7.0-0.9.0.2.tar.bz2 libfontenc-X11R7.0-1.0.1.tar.bz2 libxkbfile-X11R7.0-1.0.1.tar.bz2 libXprintUtil-X11R7.0-1.0.1.tar.bz2 libXv-X11R7.0-1.0.1.tar.bz2 Installation of Xorg Libraries Install the libraries by running the following commands for each of the chosen packages: ./configure $XORG_CONFIG && make Now as the root user: make install Configuration of Xorg Libraries If you've chosen to install Xorg into /usr, then no further configuration is necessary and you can skip the rest of this section. If you've opted for an alternate prefix, you should create two symlinks to satisfy the expected environment of several packages. Execute the following commands as the root user: ln -sv $XORG_PREFIX/lib/X11 /usr/lib/X11 && ln -sv $XORG_PREFIX/include/X11 /usr/include/X11 As with other libraries, as the root user, you must add $XORG_PREFIX/lib to /etc/ld.so.conf and execute /sbin/ldconfig. Xorg Data Xorg Data The Xorg data packages provide static data such as images and keymaps to the Xorg applications. Xorg Data packages can be downloaded individually from . Installation of Xorg Data First, install the xbitmap package by running the following commands: ./configure $XORG_CONFIG && make Now as the root user: make install At this point, you should continue to the applications installation. After the applications installation has completed, you can use the same instructions above to install the xcursor-themes and xkb-data packages. Xorg Applications Xorg Applications You must install before you install Xorg Applications. The Xorg applications provide the expected applications available in previous X Window implementations. Xorg applications can be downloaded individually from . Installation of Xorg Applications Install the applications by running the following commands for each chosen package: ./configure $XORG_CONFIG && make Now as the root user: make install The luit package should not be compiled at this point. You should install the luit application after the fonts have been installed. Installation of luit A patch is required to fix a race condition in luit that was discovered shortly after release. Download the patch from . Install luit with the following commands: patch -Np1 -i luit_1.0.1-race-1.patch && ./configure $XORG_CONFIG && make Now as the root user: make install Xorg Fonts Xorg Fonts The Xorg font packages provide needed fonts to the Xorg applications. Xorg Font packages can be downloaded individually from . Installation of Xorg Fonts Run the following commands for each package: You should install encoding and font-util before all other font packages ./configure $XORG_CONFIG Now as the root user: make install Xorg Server Xorg Server The Xorg Server is the core of the X Window system. The Xorg Server is a single download. Get it from . Installation of Xorg Server You must have the Mesa source directory available when building the Xorg-server. Install the server by running the following commands: sed -i "s@*/@*/\n#include <linux/types.h>\n@" \ hw/xfree86/os-support/linux/lnx_agp.c && ./configure --prefix=$XORG_PREFIX --sysconfdir=/etc \ --localstatedir=/var --with-mesa-source='../../Mesa-&mesalib-version;' \ --with-fontdir=/usr/share/fonts \ --with-module-dir=$XORG_PREFIX/lib/X11/modules && make Now as the root user: make install Xorg Drivers Xorg Drivers The Xorg drivers provide the means for the xserver to take advantage of installed hardware. Xorg Driver packages can be downloaded individually from . Installation of Xorg Drivers It is very important not to build display drivers that cannot be used on your hardware. For instance, do not build Sun drivers for an x86 PC as the Sun drivers will expect to see SPARC symbols exported from the kernel. Failure to follow this warning will result in a display lockup, which requires a hard reboot, when configuring Xorg for the first time. Install the drivers by running the following commands for each package: ./configure $XORG_CONFIG \ --with-xorg-module-dir=$XORG_PREFIX/lib/X11/modules && make Now as the root user: make install Configuring Xorg Make certain that you have executed ldconfig and create the xorg.conf file with: cd ~ && Xorg -configure The screen will go black and you may hear some clicking of the monitor. This command will create a file, xorg.conf.new in your home directory. /etc/X11/xorg.conf Edit xorg.conf.new to suit your system. The details of the file are located in the xorg.conf man page. Some things you may want to do are: Section "Files". Change the order of the font paths searched. You may want to put 100dpi fonts ahead of 75dpi fonts if your system normally comes up closer to 100 dots per inch. You may want to remove some font directories completely. Section "Module". If you are going to install NVidia drivers, remove the "dri" line. Sections "InputDevice". You may want to change the keyboard autorepeat rate by adding . Section "Monitor". Specify the and values if the system does not automatically detect the monitor and its values. Section "Device". You may want to set some of the options available for your selected video driver. A description of the driver parameters is in the man page for your driver. Section "Screen". Add a DefaultDepth statement such as: . In the SubSection for your default depth, add a modes line such as: . The first mode listed will normally be the starting resolution. Test the system with: X -config ~/xorg.conf.new You will only get a gray background with an X-shaped mouse cursor, but it confirms the system is working. Exit with Control+Alt+Backspace. If the system does not work, take a look at /var/log/Xorg.0.log to see what went wrong. Move the configuration file to its final location: mv ~/xorg.conf.new /etc/X11/xorg.conf Create .xinitrc: cat > ~/.xinitrc << "EOF" # Begin .xinitrc file xterm -g 80x40+0+0 & xclock -g 100x100-0+0 & twm EOF This provides an initial screen with a small clock that is managed by a simple window manager, Tab Window Manager. For details of twm, see the man page. The above file is the default configuration for Xorg. Xorg's distribution no longer includes xterm, as such the startx will fail if you have not yet installed . ~/.xinitrc When needed, Xorg creates the directory /tmp/.ICE-unix if it does not exist. If this directory is not owned by root, Xorg delays startup by a few seconds and also appends a warning to the logfile. This also affects startup of other applications. To improve performance, it is advisable to manually create the directory before Xorg uses it. Add the file creation to /etc/sysconfig/createfiles that is sourced by the /etc/rc.d/init.d/cleanfs startup script. cat >> /etc/sysconfig/createfiles << "EOF" /tmp/.ICE-unix dir 1777 root root EOF /etc/sysconfig/createfiles Start X with: startx to get a basic functional X Window System. At this point, you should check out for the necessary configuration to make X fully functional. Additionally, you can have a look at for information on fine tuning your X configuration. For a list of the package contents and a description of the commands, see the sections in the .