Introduction to Xorg-7.2

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

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Xorg7

Xorg Download and Installation Instructions

Xorg-7.0.0 introduced a completely auto-tooled, modular build system. With the new 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 293 files that need to be fetched from the download location. To assist with such a large task, installing Wget-1.10.2 is strongly recommended for downloading the needed files. A complete wget file list is provided for each section that includes multiple packages.

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 page and this thread to get an idea of what you will need. If you are unsure, you should install all packages at the cost of extra disk space. To see which packages have changed between releases of Xorg, see the upstream update and deprecated directories.

[Note]

Note

Even if you intend to download only the necessary packages, you should download the wget file lists. The list of files are ordered by dependency, and the package versions listed in the files are known to work well with each other. Further, the wget file lists contain comments for specific packages that are deprecated or are not recommended to install. Newer packages are likely intended for the next release of Xorg and have already proved to be incompatible with current versions of software installed in BLFS. The installed size of Xorg can be reduced considerably by installing only the packages that you will need and use, however, the BLFS book cannot account for all dependencies and build options for the individual Xorg packages. The instructions assume that all packages have been built. A wiki page containing dependency information is under development. You are encouraged to add to these pages if you discover additional information that may be helpful to other users who selectively install individual packages.

Additionally, because of the large number of repetitive commands, you are encouraged to partially automate the build. The commands below (or similar) can be entered at the command line to compile each group of packages (proto, utils, libs, apps, drivers). The wiki links on each group's page contain specific commands to compile the entire group of packages, based on the content of the wget files.

bash -e #exit on all errors
section=proto
version=7.2
mkdir $section
cd $section

# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5

# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
  packagedir=$(echo $package | sed 's/.tar.bz2//')
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
  rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop

The above shell will exit immediately on error. If it runs to completion, you should manually exit the shell before continuing on to the next set of instructions.

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 Window 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 Window 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="<PREFIX>"

Throughout these instructions, you will use the following configure switches for all of the packages. Create the XORG_CONFIG variable to use for this parameter substitution:

export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
    --mandir=$XORG_PREFIX/share/man --localstatedir=/var"
[Note]

Note

Make sure that you also add these variables to your personal or system-wide profile as they are used throughout this book. See The Bash Shell Startup Files for more information.

If you've decided to use an alternate prefix, be sure to add $XORG_PREFIX/bin to your PATH environment variable and $XORG_PREFIX/lib/pkgconfig to your PKG_CONFIG_PATH variable. For detailed instructions, see The Bash Shell Startup Files. You should also add $XORG_PREFIX/lib to the /etc/ld.so.conf file and $XORG_PREFIX/share/man as a MANDATORY_MANPATH in /etc/man_db.conf.

Packages in Xorg store their configuration files in $XORG_PREFIX/lib/X11 by default. This is strictly against FHS guidelines. To simplify installation, create the proper installation directories in /etc/X11 and create symlinks in $XORG_PREFIX/lib/X11 to satisfy the installation. Execute the following commands as the root user:


install -v -m755 -d \
    /etc/X11/{app-defaults,fs,twm,xdm,xinit,xkb,xsm} &&

install -v -m755 -d $XORG_PREFIX/lib/X11 &&

for link in \
    /etc/X11/{app-defaults,fs,twm,xdm,xinit,xkb,xsm}
do
    ln -sv $link $XORG_PREFIX/lib/X11
done

Last updated on 2008-08-10 15:33:05 -0500