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