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