mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
265 lines
11 KiB
XML
265 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="xorg7" xreflabel="Xorg-&xorg-version;">
|
|
<?dbhtml filename="xorg7.html"?>
|
|
|
|
|
|
<title>Introduction to Xorg-&xorg-version;</title>
|
|
|
|
<indexterm zone="xorg7">
|
|
<primary sortas="a-xorg7">Xorg</primary>
|
|
</indexterm>
|
|
|
|
|
|
<para>
|
|
<application>Xorg</application> is a freely redistributable,
|
|
open-source implementation of the <application>X</application> 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).
|
|
</para>
|
|
|
|
<bridgehead renderas="sect3">Xorg Download and Installation
|
|
Instructions</bridgehead>
|
|
|
|
<para>
|
|
Xorg-7.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 will be well over 100
|
|
packages that need to be fetched from the download location. To assist
|
|
with such a large task, installing <xref linkend="wget"/> is strongly
|
|
recommended for downloading the needed files. A complete
|
|
<application>wget</application> file list is provided for each page
|
|
that includes multiple packages.
|
|
</para>
|
|
|
|
<para>
|
|
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 <ulink url=
|
|
"https://wiki.x.org/wiki/ModuleDescriptions">this page</ulink>
|
|
and <ulink url=
|
|
"https://lists.x.org/archives/xorg-modular/2005-November/000801.html">
|
|
this thread</ulink>
|
|
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.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
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 <application>Xorg</application> and have already proved
|
|
to be incompatible with current versions of software installed in BLFS.
|
|
The installed size of <application>Xorg</application> 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 <application>Xorg</application> packages.
|
|
The instructions assume that all packages have been built.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
Additionally, because of the large number of repetitive commands,
|
|
you are encouraged to partially automate the build. Instructions have been
|
|
given that utilize the <xref linkend="sudo"/> package. It is recommended
|
|
that you use the <parameter>:NOPASSWD</parameter> configuration option
|
|
for the user that will be building the xorg packages.
|
|
</para>
|
|
|
|
<sect2 id="xorg-env" xreflabel="Xorg build environment">
|
|
<title>Setting up the Xorg Build Environment</title>
|
|
|
|
<note>
|
|
<para>
|
|
The following instructions assume that the shell
|
|
startup files have been set up as described in
|
|
<xref linkend="postlfs-config-profile" />.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
As with previous releases of the X Window System, it may be
|
|
desirable to install <application>Xorg</application> into an alternate
|
|
prefix. This is no longer common practice among Linux distributions.
|
|
The common installation prefix for <application>Xorg</application> on
|
|
Linux is <filename class="directory">/usr</filename>. 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, once
|
|
stated "At Sun, we were using
|
|
<filename class="directory">/usr/X11</filename> and plan to stick with
|
|
it." Only the <filename class="directory">/opt/*</filename> prefix or
|
|
the <filename class="directory">/usr</filename> prefix adhere to the
|
|
current FHS guidelines.
|
|
</para>
|
|
|
|
<para>
|
|
The BLFS editors recommend using the <filename class="directory">/usr</filename>
|
|
prefix.
|
|
</para>
|
|
|
|
<para>
|
|
Choose your installation prefix, and set the <envar>XORG_PREFIX</envar>
|
|
variable with the following command:
|
|
</para>
|
|
|
|
<screen><userinput>export XORG_PREFIX="<replaceable><PREFIX></replaceable>"</userinput></screen>
|
|
|
|
<para>
|
|
Throughout these instructions, you will use the following
|
|
<command>configure</command> switches for all of the packages. Create the
|
|
<envar>XORG_CONFIG</envar> variable to use for this parameter
|
|
substitution:
|
|
</para>
|
|
|
|
<screen><userinput>export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
|
|
--localstatedir=/var --disable-static"</userinput></screen>
|
|
|
|
<para>
|
|
Create an <filename>/etc/profile.d/xorg.sh</filename> configuration
|
|
file containing these variables as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/profile.d/xorg.sh << EOF
|
|
<literal>XORG_PREFIX="$XORG_PREFIX"
|
|
XORG_CONFIG="--prefix=\$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var --disable-static"
|
|
export XORG_PREFIX XORG_CONFIG</literal>
|
|
EOF
|
|
chmod 644 /etc/profile.d/xorg.sh</userinput></screen>
|
|
|
|
<note>
|
|
<para>
|
|
There is some confusion about the above 'here' document.
|
|
The backslash in front of the dollar sign is correct. Bash
|
|
will remove it when creating /etc/profile.d/xorg.sh. However, if
|
|
you are creating the file with an editor, a copy and paste operation
|
|
will not remove the backslash. It must then be removed manually.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
If you've installed <xref linkend="sudo"/>, ensure that
|
|
<envar>XORG_PREFIX</envar> and <envar>XORG_CONFIG</envar> are available
|
|
in the <application>sudo</application> environment. As the
|
|
<systemitem class="username">root</systemitem> user, run the following
|
|
command:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/sudoers.d/xorg << EOF
|
|
<literal>Defaults env_keep += XORG_PREFIX
|
|
Defaults env_keep += XORG_CONFIG</literal>
|
|
EOF</userinput></screen>
|
|
|
|
<bridgehead renderas="sect2">If you are not using the standard Xorg prefix...</bridgehead>
|
|
|
|
<warning>
|
|
<para>
|
|
If you've decided to use the standard <filename
|
|
class="directory">/usr</filename> prefix, you must omit the remainder of
|
|
this page and continue at <xref linkend='util-macros'/>.
|
|
</para>
|
|
</warning>
|
|
|
|
<para>
|
|
If you've decided to <emphasis>not</emphasis> use the standard
|
|
prefix, be sure to add <filename
|
|
class="directory">$XORG_PREFIX/bin</filename> to your <envar>PATH</envar>
|
|
environment variable, and <filename class="directory">
|
|
$XORG_PREFIX/lib/pkgconfig</filename> and <filename class="directory">
|
|
$XORG_PREFIX/share/pkgconfig</filename> to your
|
|
<envar>PKG_CONFIG_PATH</envar> variable. It is also helpful to specify
|
|
additional search paths for <command>gcc</command> and an include
|
|
directory for the <command>aclocal</command> program. Issue the
|
|
following commands as the <systemitem class="username">root</systemitem>
|
|
user:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>cat >> /etc/profile.d/xorg.sh << "EOF"
|
|
<literal>
|
|
pathappend $XORG_PREFIX/bin PATH
|
|
pathappend $XORG_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
|
|
pathappend $XORG_PREFIX/share/pkgconfig PKG_CONFIG_PATH
|
|
|
|
pathappend $XORG_PREFIX/lib LIBRARY_PATH
|
|
pathappend $XORG_PREFIX/include C_INCLUDE_PATH
|
|
pathappend $XORG_PREFIX/include CPLUS_INCLUDE_PATH
|
|
|
|
ACLOCAL="aclocal -I $XORG_PREFIX/share/aclocal"
|
|
|
|
export PATH PKG_CONFIG_PATH ACLOCAL LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH</literal>
|
|
EOF</userinput></screen>
|
|
|
|
<para>
|
|
The script above needs to be activated. Normally it will be
|
|
automatic at login, but to activate it now, as a regular user, run:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>source /etc/profile.d/xorg.sh</userinput></screen>
|
|
|
|
<para>
|
|
You should also add
|
|
<filename class="directory"> $XORG_PREFIX/lib</filename> to the
|
|
<filename>/etc/ld.so.conf</filename> file. Again, as the
|
|
<systemitem class="username">root</systemitem> user, issue the following
|
|
command:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>echo "$XORG_PREFIX/lib" >> /etc/ld.so.conf</userinput></screen>
|
|
|
|
<para>
|
|
You should also modify
|
|
<filename>/etc/man_db.conf</filename>, adding appropriate
|
|
MANDATORY_MANPATH, MANPATH_MAP, and MANDB_MAP entries following the
|
|
examples for <filename class="directory">/usr/X11R6</filename>. Issue the
|
|
following command as the <systemitem class="username">root</systemitem>
|
|
user:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>sed -e "s@<replaceable>X11R6/man</replaceable>@X11R6/share/man@g" \
|
|
-e "s@<replaceable>/usr/X11R6</replaceable>@$XORG_PREFIX@g" \
|
|
-i /etc/man_db.conf</userinput></screen>
|
|
|
|
<para>
|
|
Some applications look for shared files in <filename
|
|
class="directory">/usr/share/X11</filename>. Create a symbolic link to
|
|
the proper location as the <systemitem class="username">root</systemitem>
|
|
user:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>ln -svf $XORG_PREFIX/share/X11 /usr/share/X11</userinput></screen>
|
|
|
|
<para>
|
|
If building KDE, some cmake files look for Xorg in places other than
|
|
$XORG_PREFIX. Allow cmake to find Xorg with:
|
|
</para>
|
|
|
|
<screen role="nodump"><userinput>ln -svf $XORG_PREFIX /usr/X11R6</userinput></screen>
|
|
<!--
|
|
<para>
|
|
Finally, if building on x86_64, you will need to create the
|
|
<filename class="directory">$XORG_PREFIX/lib</filename> directory and the
|
|
<filename>$XORG_PREFIX/lib64</filename> symlink. Again, as the
|
|
<systemitem class="username">root</systemitem> user, issue the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>install -v -m755 -d $XORG_PREFIX &&
|
|
install -v -m755 -d $XORG_PREFIX/lib &&
|
|
ln -sf lib $XORG_PREFIX/lib64</userinput></screen>
|
|
-->
|
|
</sect2>
|
|
|
|
</sect1>
|