[4ff4e9a] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[4ff4e9a] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[5287b7c] | 8 | <sect1 id="xorg7" xreflabel="Xorg-&xorg-version;">
|
---|
[4ff4e9a] | 9 | <?dbhtml filename="xorg7.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info>
|
---|
| 12 | <date>$Date$</date>
|
---|
| 13 | </sect1info>
|
---|
| 14 |
|
---|
[5287b7c] | 15 | <title>Introduction to Xorg-&xorg-version;</title>
|
---|
[4ff4e9a] | 16 |
|
---|
| 17 | <indexterm zone="xorg7">
|
---|
| 18 | <primary sortas="a-xorg7">Xorg</primary>
|
---|
| 19 | </indexterm>
|
---|
| 20 |
|
---|
[38362ef] | 21 |
|
---|
[71df408] | 22 | <para>
|
---|
| 23 | <application>Xorg</application> is a freely redistributable,
|
---|
| 24 | open-source implementation of the <application>X</application> Window
|
---|
| 25 | System. This system provides a client/server interface between display
|
---|
| 26 | hardware (the mouse, keyboard, and video displays) and the desktop
|
---|
| 27 | environment, while also providing both the windowing infrastructure and a
|
---|
| 28 | standardized application interface (API).
|
---|
| 29 | </para>
|
---|
[3f72a148] | 30 |
|
---|
| 31 | <para condition="html" role="usernotes">User Notes:
|
---|
[ea9f7caf] | 32 | <ulink url='&blfs-wiki;/Xorg7'/></para>
|
---|
[3f72a148] | 33 |
|
---|
| 34 | <bridgehead renderas="sect3">Xorg Download and Installation
|
---|
| 35 | Instructions</bridgehead>
|
---|
| 36 |
|
---|
[71df408] | 37 | <para>
|
---|
| 38 | Xorg-7.0 introduced a completely auto-tooled, modular build system.
|
---|
| 39 | With the new modular build system, it is no longer possible to download
|
---|
| 40 | the entire package in a single file. In fact, there will be well over 100
|
---|
| 41 | packages that need to be fetched from the download location. To assist
|
---|
| 42 | with such a large task, installing <xref linkend="wget"/> is strongly
|
---|
| 43 | recommended for downloading the needed files. A complete
|
---|
| 44 | <application>wget</application> file list is provided for each page
|
---|
| 45 | that includes multiple packages.
|
---|
| 46 | </para>
|
---|
| 47 |
|
---|
| 48 | <para>
|
---|
| 49 | Given the number of packages available, deciding which packages you
|
---|
| 50 | need to install for your particular setup may seem a bit overwhelming at
|
---|
| 51 | first. Take a look at <ulink url=
|
---|
| 52 | "http://wiki.x.org/wiki/ModuleDescriptions">this page</ulink>
|
---|
| 53 | and <ulink url=
|
---|
| 54 | "http://lists.x.org/archives/xorg-modular/2005-November/000801.html">
|
---|
| 55 | this thread</ulink>
|
---|
| 56 | to get an idea of what you will need. If you are unsure, you should
|
---|
| 57 | install all packages at the cost of extra disk space.
|
---|
| 58 | </para>
|
---|
[3f72a148] | 59 |
|
---|
| 60 | <note>
|
---|
[71df408] | 61 | <para>
|
---|
| 62 | Even if you intend to download only the necessary packages, you
|
---|
| 63 | should download the wget file lists. The list of files are ordered by
|
---|
| 64 | dependency, and the package versions listed in the files are known to
|
---|
| 65 | work well with each other. Further, the wget file lists contain comments
|
---|
| 66 | for specific packages that are deprecated or are not recommended to
|
---|
| 67 | install. Newer packages are likely intended for the
|
---|
| 68 | next release of <application>Xorg</application> and have already proved
|
---|
| 69 | to be incompatible with current versions of software installed in BLFS.
|
---|
| 70 | The installed size of <application>Xorg</application> can be reduced
|
---|
| 71 | considerably by installing only the packages that you will need and use,
|
---|
| 72 | however, the BLFS book cannot account for all dependencies and build
|
---|
| 73 | options for the individual <application>Xorg</application> packages.
|
---|
| 74 | The instructions assume that all packages have been built. A
|
---|
| 75 | <ulink url="&blfs-wiki;/Xorg7">wiki</ulink>
|
---|
| 76 | page containing dependency information is under development. You are
|
---|
| 77 | encouraged to add to these pages if you discover additional information
|
---|
| 78 | that may be helpful to other users who selectively install individual
|
---|
| 79 | packages.
|
---|
| 80 | </para>
|
---|
[3f72a148] | 81 | </note>
|
---|
| 82 |
|
---|
[71df408] | 83 | <para>
|
---|
| 84 | Additionally, because of the large number of repetitive commands,
|
---|
| 85 | you are encouraged to partially automate the build. Instructions have been
|
---|
| 86 | given that utilize the <xref linkend="sudo"/> package. It is recommended
|
---|
| 87 | that you use the <parameter>:NOPASSWD</parameter> configuration option
|
---|
| 88 | for the user that will be building the xorg packages.
|
---|
| 89 | </para>
|
---|
[5287b7c] | 90 |
|
---|
[57de35d] | 91 | <sect2 id="xorg-env" xreflabel="Xorg build environment">
|
---|
[4ff4e9a] | 92 | <title>Setting up the Xorg Build Environment</title>
|
---|
| 93 |
|
---|
[71df408] | 94 | <note>
|
---|
| 95 | <para>
|
---|
| 96 | The following instructions assume that the shell
|
---|
| 97 | startup files have been set up as described in
|
---|
| 98 | <xref linkend="postlfs-config-profile" />.
|
---|
| 99 | </para>
|
---|
| 100 | </note>
|
---|
[dc53944] | 101 |
|
---|
[71df408] | 102 | <para>
|
---|
| 103 | As with previous releases of the X Window System, it may be
|
---|
| 104 | desirable to install <application>Xorg</application> into an alternate
|
---|
| 105 | prefix. This is no longer common practice among Linux distributions.
|
---|
| 106 | The common installation prefix for <application>Xorg</application> on
|
---|
| 107 | Linux is <filename class="directory">/usr</filename>. There is no
|
---|
| 108 | standard alternate prefix, nor is there any exception in the current
|
---|
| 109 | revision of the Filesystem Hierarchy Standard for Release 7 of the X
|
---|
| 110 | Window System. Alan Coopersmith of Sun Microsystems, once
|
---|
| 111 | stated "At Sun, we were using
|
---|
| 112 | <filename class="directory">/usr/X11</filename> and plan to stick with
|
---|
| 113 | it." Only the <filename class="directory">/opt/*</filename> prefix or
|
---|
| 114 | the <filename class="directory">/usr</filename> prefix adhere to the
|
---|
| 115 | current FHS guidelines.
|
---|
| 116 | </para>
|
---|
| 117 |
|
---|
| 118 | <para>
|
---|
| 119 | Choose your installation prefix, and set the <envar>XORG_PREFIX</envar>
|
---|
| 120 | variable with the following command:
|
---|
| 121 | </para>
|
---|
[4ff4e9a] | 122 |
|
---|
[3f72a148] | 123 | <screen><userinput>export XORG_PREFIX="<replaceable><PREFIX></replaceable>"</userinput></screen>
|
---|
[4ff4e9a] | 124 |
|
---|
[71df408] | 125 | <para>
|
---|
| 126 | Throughout these instructions, you will use the following
|
---|
| 127 | <command>configure</command> switches for all of the packages. Create the
|
---|
| 128 | <envar>XORG_CONFIG</envar> variable to use for this parameter
|
---|
| 129 | substitution:
|
---|
| 130 | </para>
|
---|
[4ff4e9a] | 131 |
|
---|
[7be99f2c] | 132 | <screen><userinput>export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
|
---|
[bb7f58e] | 133 | --localstatedir=/var --disable-static"</userinput></screen>
|
---|
[4ff4e9a] | 134 |
|
---|
[71df408] | 135 | <para>
|
---|
| 136 | Create an <filename>/etc/profile.d/xorg.sh</filename> configuration
|
---|
| 137 | file containing these variables as the
|
---|
| 138 | <systemitem class="username">root</systemitem> user:
|
---|
| 139 | </para>
|
---|
[e123f715] | 140 |
|
---|
[87b2a53] | 141 | <screen role="root"><userinput>cat > /etc/profile.d/xorg.sh << EOF
|
---|
[51dfb3e] | 142 | <literal>XORG_PREFIX="$XORG_PREFIX"
|
---|
[87b2a53] | 143 | XORG_CONFIG="--prefix=\$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var --disable-static"
|
---|
[51dfb3e] | 144 | export XORG_PREFIX XORG_CONFIG</literal>
|
---|
[e123f715] | 145 | EOF
|
---|
| 146 | chmod 644 /etc/profile.d/xorg.sh</userinput></screen>
|
---|
| 147 |
|
---|
[71df408] | 148 | <note>
|
---|
| 149 | <para>
|
---|
[b9c353b] | 150 | There is some confusion about the above 'here' document.
|
---|
[71df408] | 151 | The backslash in front of the dollar sign is correct. Bash
|
---|
| 152 | will remove it when creating /etc/profile.d/xorg.sh. However, if
|
---|
| 153 | you are creating the file with an editor, a copy and paste operation
|
---|
[b9c353b] | 154 | will not remove the backslash. It must then be removed manually.
|
---|
[71df408] | 155 | </para>
|
---|
| 156 | </note>
|
---|
[a1b111f8] | 157 |
|
---|
[5ce789c] | 158 | <para>
|
---|
| 159 | If you've installed <xref linkend="sudo"/>, ensure that
|
---|
| 160 | <envar>XORG_PREFIX</envar> and <envar>XORG_CONFIG</envar> are available
|
---|
| 161 | in the <application>sudo</application> environment. As the
|
---|
| 162 | <systemitem class="username">root</systemitem> user, run the following
|
---|
| 163 | command:
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
| 166 | <screen role="root"><userinput>cat > /etc/sudoers.d/xorg << EOF
|
---|
| 167 | <literal>Defaults env_keep += XORG_PREFIX
|
---|
| 168 | Defaults env_keep += XORG_CONFIG</literal>
|
---|
| 169 | EOF</userinput></screen>
|
---|
| 170 |
|
---|
[6819668d] | 171 | <bridgehead renderas="sect2">If you are not using the standard Xorg prefix...</bridgehead>
|
---|
| 172 |
|
---|
[e1616ac2] | 173 | <warning>
|
---|
[71df408] | 174 | <para>
|
---|
| 175 | If you've decided to use the standard <filename
|
---|
[e1616ac2] | 176 | class="directory">/usr</filename> prefix, you must omit the remainder of
|
---|
[71df408] | 177 | this page and continue at <xref linkend='util-macros'/>.
|
---|
| 178 | </para>
|
---|
[e1616ac2] | 179 | </warning>
|
---|
[71df408] | 180 |
|
---|
| 181 | <para>
|
---|
| 182 | If you've decided to <emphasis>not</emphasis> use the standard
|
---|
| 183 | prefix, be sure to add <filename
|
---|
| 184 | class="directory">$XORG_PREFIX/bin</filename> to your <envar>PATH</envar>
|
---|
| 185 | environment variable, and <filename class="directory">
|
---|
| 186 | $XORG_PREFIX/lib/pkgconfig</filename> and <filename class="directory">
|
---|
| 187 | $XORG_PREFIX/share/pkgconfig</filename> to your
|
---|
| 188 | <envar>PKG_CONFIG_PATH</envar> variable. It is also helpful to specify
|
---|
| 189 | additional search paths for <command>gcc</command> and an include
|
---|
| 190 | directory for the <command>aclocal</command> program. Issue the
|
---|
| 191 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 192 | user:
|
---|
| 193 | </para>
|
---|
[e123f715] | 194 |
|
---|
[87b2a53] | 195 | <screen role="root"><userinput>cat >> /etc/profile.d/xorg.sh << "EOF"
|
---|
[51dfb3e] | 196 | <literal>
|
---|
[8e29d97] | 197 | pathappend $XORG_PREFIX/bin PATH
|
---|
| 198 | pathappend $XORG_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
|
---|
[e123f715] | 199 | pathappend $XORG_PREFIX/share/pkgconfig PKG_CONFIG_PATH
|
---|
[d78ed0cb] | 200 |
|
---|
[8e29d97] | 201 | pathappend $XORG_PREFIX/lib LIBRARY_PATH
|
---|
| 202 | pathappend $XORG_PREFIX/include C_INCLUDE_PATH
|
---|
| 203 | pathappend $XORG_PREFIX/include CPLUS_INCLUDE_PATH
|
---|
| 204 |
|
---|
[87ff6f30] | 205 | ACLOCAL="aclocal -I $XORG_PREFIX/share/aclocal"
|
---|
[d78ed0cb] | 206 |
|
---|
[51dfb3e] | 207 | export PATH PKG_CONFIG_PATH ACLOCAL LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH</literal>
|
---|
[2d237fa] | 208 | EOF</userinput></screen>
|
---|
[e123f715] | 209 |
|
---|
[71df408] | 210 | <para>
|
---|
[8558044] | 211 | The script above needs to be activated. Normally it will be
|
---|
[71df408] | 212 | automatic at login, but to activate it now, as a regular user, run:
|
---|
| 213 | </para>
|
---|
[d60c5feb] | 214 |
|
---|
| 215 | <screen><userinput>source /etc/profile.d/xorg.sh</userinput></screen>
|
---|
| 216 |
|
---|
[71df408] | 217 | <para>
|
---|
| 218 | You should also add
|
---|
| 219 | <filename class="directory"> $XORG_PREFIX/lib</filename> to the
|
---|
| 220 | <filename>/etc/ld.so.conf</filename> file. Again, as the
|
---|
| 221 | <systemitem class="username">root</systemitem> user, issue the following
|
---|
| 222 | command:
|
---|
| 223 | </para>
|
---|
[e123f715] | 224 |
|
---|
[87b2a53] | 225 | <screen role="root"><userinput>echo "$XORG_PREFIX/lib" >> /etc/ld.so.conf</userinput></screen>
|
---|
[e123f715] | 226 |
|
---|
[71df408] | 227 | <para>
|
---|
| 228 | You should also modify
|
---|
| 229 | <filename>/etc/man_db.conf</filename>, adding appropriate
|
---|
| 230 | MANDATORY_MANPATH, MANPATH_MAP, and MANDB_MAP entries following the
|
---|
| 231 | examples for <filename class="directory">/usr/X11R6</filename>. Issue the
|
---|
| 232 | following command as the <systemitem class="username">root</systemitem>
|
---|
| 233 | user:
|
---|
| 234 | </para>
|
---|
[e123f715] | 235 |
|
---|
[553e615] | 236 | <screen role="root"><userinput>sed -e "s@<replaceable>X11R6/man</replaceable>@X11R6/share/man@g" \
|
---|
| 237 | -e "s@<replaceable>/usr/X11R6</replaceable>@$XORG_PREFIX@g" \
|
---|
| 238 | -i /etc/man_db.conf</userinput></screen>
|
---|
[e123f715] | 239 |
|
---|
[71df408] | 240 | <para>
|
---|
| 241 | Some applications look for shared files in <filename
|
---|
| 242 | class="directory">/usr/share/X11</filename>. Create a symbolic link to
|
---|
| 243 | the proper location as the <systemitem class="username">root</systemitem>
|
---|
| 244 | user:
|
---|
| 245 | </para>
|
---|
[204fe99] | 246 |
|
---|
[ba4e992] | 247 | <screen role="root"><userinput>ln -svf $XORG_PREFIX/share/X11 /usr/share/X11</userinput></screen>
|
---|
[aed3e6ec] | 248 |
|
---|
[71df408] | 249 | <para>
|
---|
| 250 | If building KDE, some cmake files look for Xorg in places other than
|
---|
| 251 | $XORG_PREFIX. Allow cmake to find Xorg with:
|
---|
| 252 | </para>
|
---|
[aed3e6ec] | 253 |
|
---|
[ba4e992] | 254 | <screen role="root"><userinput>ln -svf $XORG_PREFIX /usr/X11R6</userinput></screen>
|
---|
[87ff6f30] | 255 | <!--
|
---|
[71df408] | 256 | <para>
|
---|
| 257 | Finally, if building on x86_64, you will need to create the
|
---|
| 258 | <filename class="directory">$XORG_PREFIX/lib</filename> directory and the
|
---|
| 259 | <filename>$XORG_PREFIX/lib64</filename> symlink. Again, as the
|
---|
| 260 | <systemitem class="username">root</systemitem> user, issue the following
|
---|
| 261 | commands:
|
---|
| 262 | </para>
|
---|
[e123f715] | 263 |
|
---|
[87b2a53] | 264 | <screen role="root"><userinput>install -v -m755 -d $XORG_PREFIX &&
|
---|
[e123f715] | 265 | install -v -m755 -d $XORG_PREFIX/lib &&
|
---|
[aed3e6ec] | 266 | ln -sf lib $XORG_PREFIX/lib64</userinput></screen>
|
---|
[87ff6f30] | 267 | -->
|
---|
[4ff4e9a] | 268 | </sect2>
|
---|
| 269 |
|
---|
[190568b] | 270 | </sect1>
|
---|