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