[feeb99a] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[feeb99a] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[3e7ee20] | 7 | <!ENTITY xorg-download-http "http://xorg.freedesktop.org/releases/X11R&xorg-version;/src-single/X11R&xorg-version;-src.tar.bz2 ">
|
---|
| 8 | <!ENTITY xorg-download-ftp "ftp://expo.x.org/pub/X11R&xorg-version;/src-single/X11R&xorg-version;-src.tar.bz2">
|
---|
| 9 | <!ENTITY xorg-md5sum "52ad69832db5c36c7041f90625ed4598">
|
---|
| 10 | <!ENTITY xorg-size "45 MB">
|
---|
| 11 | <!ENTITY xorg-buildsize "864 MB">
|
---|
| 12 | <!ENTITY xorg-time "11.68 SBU">
|
---|
[feeb99a] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="xorg" xreflabel="X.org-&xorg-version;">
|
---|
[36c3ba1] | 16 | <?dbhtml filename="xorg.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[76a39aa] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">X11R&xorg-version;-src.tar</keyword>
|
---|
[3f5f915] | 23 | <keyword role="ftpdir">Xorg</keyword>
|
---|
[76a39aa] | 24 | </keywordset>
|
---|
[36c3ba1] | 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>Xorg-&xorg-version;</title>
|
---|
| 28 |
|
---|
| 29 | <indexterm zone="xorg">
|
---|
| 30 | <primary sortas="a-xorg">Xorg</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to Xorg</title>
|
---|
| 35 |
|
---|
| 36 | <note>
|
---|
[3e7ee20] | 37 | <para>There are three packages in BLFS that implement the <application>X
|
---|
[d9c80e1] | 38 | Window System</application>: <application>Xorg</application>
|
---|
| 39 | (X11R6 and X11R7) and <application>XFree86</application>. These
|
---|
| 40 | packages are all quite similar. In fact, the base system of
|
---|
| 41 | <application>Xorg</application> is
|
---|
[3e7ee20] | 42 | <application>XFree86</application>-4.4.0RC2. Licensing was the original
|
---|
| 43 | reason for the split. <application>Xorg-&xorg7-version;</application>
|
---|
| 44 | introduces a completely autotooled build system, but is otherwise the
|
---|
[d9c80e1] | 45 | same codebase as <application>Xorg-&xorg-version;</application>.
|
---|
[36c3ba1] | 46 | Most large commercial distributions have decided to use the
|
---|
[3e7ee20] | 47 | <application>Xorg</application> package, but several still provide
|
---|
[36c3ba1] | 48 | <application>XFree86</application>.</para>
|
---|
| 49 |
|
---|
| 50 | <para>A second reason for the forking of <application>X</application>
|
---|
| 51 | packages is the stated goals of the developers. Some developers were
|
---|
| 52 | unhappy with the administration and progress of
|
---|
| 53 | <application>XFree86</application>. X.org's future plans include
|
---|
[d9c80e1] | 54 | significant improvements to the internals of the system and more
|
---|
[3e7ee20] | 55 | frequent releases.</para>
|
---|
[36c3ba1] | 56 |
|
---|
| 57 | <para><application>XFree86</application> continues to be a solid,
|
---|
| 58 | conservative application with excellent driver support.</para>
|
---|
| 59 |
|
---|
| 60 | </note>
|
---|
| 61 |
|
---|
| 62 | <para><application>Xorg</application> is a freely redistributable open-source
|
---|
| 63 | implementation of the <application>X</application> Window System. This
|
---|
[3e7ee20] | 64 | system provides a client/server interface between display hardware (the
|
---|
[36c3ba1] | 65 | mouse, keyboard, and video displays) and the desktop environment, while also
|
---|
| 66 | providing both the windowing infrastructure and a standardized application
|
---|
| 67 | interface (API).</para>
|
---|
| 68 |
|
---|
| 69 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 70 | <itemizedlist spacing="compact">
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>Download (HTTP): <ulink url="&xorg-download-http;"/></para>
|
---|
| 73 | </listitem>
|
---|
| 74 | <listitem>
|
---|
| 75 | <para>Download (FTP): <ulink url="&xorg-download-ftp;"/></para>
|
---|
| 76 | </listitem>
|
---|
| 77 | <listitem>
|
---|
| 78 | <para>Download MD5 sum: &xorg-md5sum;</para>
|
---|
| 79 | </listitem>
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>Download size: &xorg-size;</para>
|
---|
| 82 | </listitem>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>Estimated disk space required: &xorg-buildsize;</para>
|
---|
| 85 | </listitem>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>Estimated build time: &xorg-time;</para>
|
---|
| 88 | </listitem>
|
---|
| 89 | </itemizedlist>
|
---|
| 90 |
|
---|
[10bffdc8] | 91 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 92 | <itemizedlist spacing="compact">
|
---|
| 93 | <listitem>
|
---|
| 94 | <para>Required patch: <ulink
|
---|
[babac3ec] | 95 | url="&patch-root;/xorg-&xorg-version;-luit_race-1.patch"/></para>
|
---|
[10bffdc8] | 96 | </listitem>
|
---|
| 97 | </itemizedlist>
|
---|
| 98 |
|
---|
[7d7bb83] | 99 | <bridgehead renderas="sect3">Xorg Dependencies</bridgehead>
|
---|
[36c3ba1] | 100 |
|
---|
| 101 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[76a39aa] | 102 | <para role="required"><xref linkend="libpng"/> and
|
---|
[36c3ba1] | 103 | <xref linkend="fontconfig"/></para>
|
---|
| 104 |
|
---|
| 105 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[76a39aa] | 106 | <para role="optional"><xref linkend="linux-pam"/></para>
|
---|
[36c3ba1] | 107 |
|
---|
[1663c2b5] | 108 | <para condition="html" role="usernotes">User Notes:
|
---|
| 109 | <ulink url='&blfs-wiki;/Xorg-&xorg-version;'/></para>
|
---|
[18bcaf6] | 110 |
|
---|
[36c3ba1] | 111 | <bridgehead renderas="sect3">Download Instructions</bridgehead>
|
---|
| 112 |
|
---|
| 113 | <para>As an alternative to downloading the entire source tree in a single
|
---|
[d9c80e1] | 114 | file, there are several, smaller files that can be fetched from the
|
---|
[3e7ee20] | 115 | download location (directory /pub/X11R&xorg-version;/src/):</para>
|
---|
[36c3ba1] | 116 |
|
---|
| 117 | <itemizedlist spacing='compact'>
|
---|
| 118 | <listitem>
|
---|
| 119 | <para><filename>X11R&xorg-version;-src1.tar.gz</filename></para>
|
---|
| 120 | </listitem>
|
---|
| 121 | <listitem>
|
---|
| 122 | <para><filename>X11R&xorg-version;-src2.tar.gz</filename></para>
|
---|
| 123 | </listitem>
|
---|
| 124 | <listitem>
|
---|
| 125 | <para><filename>X11R&xorg-version;-src3.tar.gz</filename></para>
|
---|
| 126 | </listitem>
|
---|
| 127 | <listitem>
|
---|
| 128 | <para><filename>X11R&xorg-version;-src4.tar.gz</filename></para>
|
---|
| 129 | </listitem>
|
---|
| 130 | <listitem>
|
---|
| 131 | <para><filename>X11R&xorg-version;-src5.tar.gz</filename></para>
|
---|
| 132 | </listitem>
|
---|
| 133 | <listitem>
|
---|
| 134 | <para><filename>X11R&xorg-version;-src6.tar.gz</filename></para>
|
---|
| 135 | </listitem>
|
---|
| 136 | <listitem>
|
---|
| 137 | <para><filename>X11R&xorg-version;-src7.tar.gz</filename></para>
|
---|
| 138 | </listitem>
|
---|
| 139 | </itemizedlist>
|
---|
| 140 |
|
---|
| 141 | <para>The first package contains the <application>Xorg</application>
|
---|
| 142 | libraries and support programs, the second contains standard
|
---|
| 143 | <application>X</application> programs, the third contains the
|
---|
| 144 | <application>X</application> server, the fourth and fifth are fonts,
|
---|
| 145 | the sixth is normal documentation, and the seventh is hardcopy
|
---|
| 146 | documentation.</para>
|
---|
| 147 |
|
---|
| 148 | <para>To check your file for integrity, download the
|
---|
| 149 | <filename>md5sums</filename> file. Then:</para>
|
---|
| 150 |
|
---|
| 151 | <screen><userinput>md5sum -c md5sums</userinput></screen>
|
---|
| 152 |
|
---|
| 153 | <para>The package (or all seven packages) should give an OK status.</para>
|
---|
| 154 |
|
---|
| 155 | </sect2>
|
---|
| 156 |
|
---|
| 157 | <sect2 role="kernel" id='xorg-kernel'>
|
---|
| 158 | <title>Kernel Configuration</title>
|
---|
| 159 |
|
---|
| 160 | <indexterm zone="xorg xorg-kernel">
|
---|
| 161 | <primary sortas="d-Xorg">Xorg</primary>
|
---|
| 162 | </indexterm>
|
---|
| 163 |
|
---|
| 164 | <para>If you have an Intel P6 (Pentium Pro, Pentium II and later), it is
|
---|
| 165 | recommended that you compile MTRR (Memory Type Range Registers) support
|
---|
| 166 | into the kernel. The kernel can map Cyrix and AMD CPUs to the MTRR
|
---|
| 167 | interface, so selecting this option is useful for those processors also.
|
---|
| 168 | This option is found in the "Processor type and features" menu. It can
|
---|
| 169 | increase performance of image write operations 2.5 times or more on PCI or
|
---|
| 170 | AGP video cards.</para>
|
---|
| 171 |
|
---|
[9ec95e7] | 172 | <para>In the "Character Devices" section of the "Device Drivers" menu,
|
---|
| 173 | enable AGP Support and select the chipset support on your motherboard. If
|
---|
| 174 | you do not know the chipset, you may select all the chip types at the
|
---|
| 175 | expense of extra kernel size. You can usually determine your motherboard's
|
---|
| 176 | chipset by running the command <command>lspci</command>, a program from the
|
---|
| 177 | <xref linkend="pciutils"/> package.</para>
|
---|
[36c3ba1] | 178 |
|
---|
| 179 | <para>In the "Character Devices" section, <emphasis>disable</emphasis>
|
---|
| 180 | Direct Rendering Manager unless you have a Direct Rendering Infrastructure
|
---|
| 181 | (DRI) supported video card. A complete list of DRI supported video cards
|
---|
| 182 | can be found at <ulink url="http://dri.sourceforge.net" /> in the "Status"
|
---|
| 183 | section. Currently, supported cards include those from 3dfx (Voodoo,
|
---|
| 184 | Banshee), 3Dlabs, ATI (Rage Pro, Rage 128, Radeon 7X00, Radeon 2), Intel
|
---|
| 185 | (i810, i815), and Matrox (G200, G400, G450).</para>
|
---|
| 186 |
|
---|
| 187 | <para>Additionally NVidia provides their own closed source binary drivers,
|
---|
| 188 | which do not make use of DRI. If you intend to use these drivers, do not
|
---|
| 189 | enable DRI.</para>
|
---|
| 190 |
|
---|
| 191 | <para>If you made any changes to the kernel configuration, recompile and
|
---|
| 192 | install the new kernel.</para>
|
---|
| 193 |
|
---|
| 194 | </sect2>
|
---|
| 195 |
|
---|
| 196 | <sect2 role="installation">
|
---|
| 197 | <title>Installation of Xorg</title>
|
---|
| 198 |
|
---|
[10bffdc8] | 199 | <sect3>
|
---|
[3e7ee20] | 200 | <title>Various build fixes</title>
|
---|
[10bffdc8] | 201 |
|
---|
| 202 | <para>The <application>Xorg</application> sources must be patched in
|
---|
[3e7ee20] | 203 | order to avoid a race condition with the <application>luit</application>
|
---|
| 204 | program. Additionally, recent <application>glibc</application> requires
|
---|
[d9c80e1] | 205 | <filename>linux/types.h</filename> to be included prior to
|
---|
| 206 | <filename>asm/types.h</filename>. Fix both issues with the following
|
---|
[3e7ee20] | 207 | commands:</para>
|
---|
[10bffdc8] | 208 |
|
---|
[18bcaf6] | 209 | <screen><userinput>patch -Np1 -i ../xorg-&xorg-version;-luit_race-1.patch &&
|
---|
[3e7ee20] | 210 | sed -i "s@*/@*/\n#include <linux/types.h>\n@" \
|
---|
| 211 | programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c</userinput></screen>
|
---|
| 212 |
|
---|
[d9c80e1] | 213 | <para>Additionally, if you choose to install
|
---|
| 214 | <application>Xorg</application> to any prefix other than
|
---|
[3e7ee20] | 215 | <filename class="directory">/usr/X11R6</filename>, the luit package
|
---|
[d9c80e1] | 216 | needs another correction to fix a hard coded path. Execute the
|
---|
[3e7ee20] | 217 | following command:</para>
|
---|
| 218 |
|
---|
| 219 | <screen><userinput>sed -i 's@/usr/X11R6@<replaceable>[/usr]</replaceable>@' programs/luit/parser.h</userinput></screen>
|
---|
[10bffdc8] | 220 |
|
---|
| 221 | </sect3>
|
---|
| 222 |
|
---|
[36c3ba1] | 223 | <sect3>
|
---|
| 224 | <title>Suppressing Xprint-related Modification to '/etc'</title>
|
---|
| 225 |
|
---|
| 226 | <para><application>Xorg</application> insists on putting
|
---|
| 227 | its boot and profile scripts into the <filename
|
---|
| 228 | class="directory">/etc</filename> directory even if specifically told
|
---|
| 229 | not to compile anything Xprint server or client related (see
|
---|
| 230 | <filename>host.def</filename> below). The following command will
|
---|
| 231 | suppress any such modifications:</para>
|
---|
| 232 |
|
---|
| 233 | <screen><userinput>sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile</userinput></screen>
|
---|
| 234 |
|
---|
| 235 | </sect3>
|
---|
| 236 |
|
---|
| 237 | <sect3>
|
---|
| 238 | <title>Setting Up a Shadow Directory</title>
|
---|
| 239 |
|
---|
| 240 | <para>When building <application>Xorg</application>, you should create
|
---|
| 241 | a shadow directory of symbolic links for the compiled code. To do that,
|
---|
| 242 | first make <command>lndir</command>. Starting from the
|
---|
| 243 | <filename class='directory'>xc</filename> directory:</para>
|
---|
| 244 |
|
---|
| 245 | <screen><userinput>pushd config/util &&
|
---|
[9a2fba9] | 246 | make -f Makefile.ini lndir
|
---|
| 247 | popd</userinput></screen>
|
---|
[36c3ba1] | 248 |
|
---|
| 249 | <para>Now create the shadow tree:</para>
|
---|
| 250 |
|
---|
| 251 | <screen><userinput>mkdir ../xcbuild &&
|
---|
[feeb99a] | 252 | cd ../xcbuild &&
|
---|
[9a2fba9] | 253 | ../xc/config/util/lndir ../xc</userinput></screen>
|
---|
[36c3ba1] | 254 |
|
---|
| 255 | </sect3>
|
---|
| 256 |
|
---|
| 257 | <sect3>
|
---|
| 258 | <title>Creating 'host.def'</title>
|
---|
| 259 |
|
---|
| 260 | <para>The next step is to create the
|
---|
| 261 | <filename>config/cf/host.def</filename> file. The documentation for
|
---|
| 262 | <application>Xorg</application> indicates that the application will
|
---|
| 263 | build without a <filename>host.def</filename> file, but the included
|
---|
| 264 | libraries for <application>Fontconfig</application> and
|
---|
| 265 | <application>FreeType2</application> do not build properly on a base
|
---|
| 266 | LFS system. Therefore, you must specify that these libraries, as well
|
---|
| 267 | as others, should be imported from the system.</para>
|
---|
| 268 |
|
---|
| 269 | <note>
|
---|
| 270 | <para><filename>config/cf/host.def</filename> is a C file, not a
|
---|
| 271 | shell script. Ensure the comments delimited by /* ... */ are balanced
|
---|
| 272 | when modifying the file.</para>
|
---|
| 273 | </note>
|
---|
| 274 |
|
---|
| 275 | <screen><userinput>cat > config/cf/host.def << "EOF"
|
---|
| 276 | <literal>/* Begin Xorg host.def file */
|
---|
| 277 |
|
---|
[feeb99a] | 278 | /* System Related Information. If you read and configure only one
|
---|
[36c3ba1] | 279 | * section then it should be this one. The Intel architecture defaults
|
---|
| 280 | * are set for a i686 and higher. Axp is for the Alpha architecture
|
---|
| 281 | * and Ppc is for the Power PC. AMD64 is for the Opteron processor.
|
---|
| 282 | * Note that there have been reports that the Ppc optimization line
|
---|
| 283 | * causes segmentation faults during build. If that happens, try
|
---|
[47603ac1] | 284 | * building without the DefaultGcc2PpcOpt line. ***********/
|
---|
[36c3ba1] | 285 |
|
---|
[a592e42] | 286 | /* #define DefaultGcc2i386Opt -O2 -fno-strength-reduce \
|
---|
| 287 | -fno-strict-aliasing -march=i686 */
|
---|
| 288 | /* #define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce \
|
---|
| 289 | -fno-strict-aliasing */
|
---|
| 290 | /* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */
|
---|
| 291 | /* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */
|
---|
[feeb99a] | 292 |
|
---|
[7461475] | 293 | #define HasFreetype2 YES
|
---|
| 294 | #define HasFontconfig YES
|
---|
| 295 | #define HasExpat YES
|
---|
| 296 | #define HasLibpng YES
|
---|
| 297 | #define HasZlib YES
|
---|
[feeb99a] | 298 |
|
---|
| 299 | /*
|
---|
[36c3ba1] | 300 | * Which drivers to build. When building a static server, each of
|
---|
| 301 | * these will be included in it. When building the loadable server
|
---|
[47603ac1] | 302 | * each of these modules will be built.
|
---|
[feeb99a] | 303 | *
|
---|
| 304 | #define XF86CardDrivers mga glint nv tga s3virge sis rendition \
|
---|
| 305 | neomagic i740 tdfx savage \
|
---|
| 306 | cirrus vmware tseng trident chips apm \
|
---|
| 307 | GlideDriver fbdev i128 \
|
---|
[5c8344d] | 308 | ati DevelDrivers ark \
|
---|
[47603ac1] | 309 | cyrix siliconmotion vesa vga \
|
---|
| 310 | XF86OSCardDrivers XF86ExtraCardDrivers
|
---|
[feeb99a] | 311 | */
|
---|
| 312 |
|
---|
| 313 | /*
|
---|
| 314 | * Select the XInput devices you want by uncommenting this.
|
---|
| 315 | *
|
---|
| 316 | #define XInputDrivers mouse keyboard acecad calcomp citron \
|
---|
| 317 | digitaledge dmc dynapro elographics \
|
---|
[47603ac1] | 318 | microtouch mutouch penmount spaceorb \
|
---|
| 319 | summa wacom void magictouch aiptek
|
---|
[feeb99a] | 320 | */
|
---|
| 321 |
|
---|
| 322 | /* Most installs will only need this */
|
---|
| 323 |
|
---|
| 324 | #define XInputDrivers mouse keyboard
|
---|
| 325 |
|
---|
[3e7ee20] | 326 | /* Xterm is no longer built by default */
|
---|
| 327 | #define BuildXterm YES
|
---|
| 328 |
|
---|
[fb0480d5] | 329 | /* Disable building Xprint server and clients until we get them figured
|
---|
| 330 | * out but build Xprint libraries to allow precompiled binaries such as
|
---|
| 331 | * Acrobat Reader to run.
|
---|
| 332 | */
|
---|
[7461475] | 333 |
|
---|
[fb0480d5] | 334 | #define XprtServer NO
|
---|
| 335 | #define BuildXprintClients NO
|
---|
[feeb99a] | 336 |
|
---|
[2ee51e6] | 337 | /* Uncomment the following define if you would prefer to install X into
|
---|
| 338 | * /usr or change it to any other location that you prefer.
|
---|
[bccbdaea] | 339 | * The GL related defines disable compatibility symlinks (the links
|
---|
[310cc9a] | 340 | * are not needed when X is installed in /usr).
|
---|
[f84ff8d] | 341 | #define ProjectRoot /usr
|
---|
| 342 | #define LinkGLToUsrInclude NO
|
---|
| 343 | #define LinkGLToUsrLib NO
|
---|
[2ee51e6] | 344 | */
|
---|
| 345 |
|
---|
[36c3ba1] | 346 | /* End Xorg host.def file */</literal>
|
---|
| 347 | EOF</userinput></screen>
|
---|
[feeb99a] | 348 |
|
---|
[36c3ba1] | 349 | <para>There are several other options that you may want to consider.
|
---|
| 350 | A well documented example file is
|
---|
| 351 | <filename>config/cf/xorgsite.def</filename>.</para>
|
---|
[2826127] | 352 |
|
---|
[36c3ba1] | 353 | </sect3>
|
---|
[feeb99a] | 354 |
|
---|
[36c3ba1] | 355 | <sect3>
|
---|
| 356 | <title>Build Commands</title>
|
---|
[2826127] | 357 |
|
---|
[36c3ba1] | 358 | <para>Install <application>Xorg</application> by running the
|
---|
| 359 | following commands:</para>
|
---|
| 360 |
|
---|
| 361 | <screen><userinput>sed -i -e "s@^#include <linux/config.h>@/* & */@" \
|
---|
[df3a050] | 362 | `grep -lr linux/config.h *` &&
|
---|
[36c3ba1] | 363 | ( make World 2>&1 | tee xorg-compile.log && exit $PIPESTATUS )</userinput></screen>
|
---|
| 364 |
|
---|
| 365 | <para>Again as the <systemitem class="username">root</systemitem>
|
---|
| 366 | user:</para>
|
---|
[2826127] | 367 |
|
---|
[36c3ba1] | 368 | <screen role="root"><userinput>make install &&
|
---|
[32077ed] | 369 | make install.man</userinput></screen>
|
---|
| 370 |
|
---|
| 371 | <para>If you've installed <application>Xorg</application> in the default
|
---|
[d9c80e1] | 372 | prefix listed above, run the following commands as the
|
---|
[32077ed] | 373 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 374 |
|
---|
| 375 | <screen role="root"><userinput>ln -v -s ../X11R6/bin /usr/bin/X11 &&
|
---|
[b2febe4e] | 376 | ln -v -s ../X11R6/lib/X11 /usr/lib/X11 &&
|
---|
| 377 | ln -v -s ../X11R6/include/X11 /usr/include/X11</userinput></screen>
|
---|
[36c3ba1] | 378 |
|
---|
[18bcaf6] | 379 | <para>The <application>Xorg</application> fonts have been installed
|
---|
| 380 | outside of <application>Fontconfig</application>'s default search path
|
---|
| 381 | of <filename class="directory">/usr/share/fonts</filename>. In order
|
---|
| 382 | for <application>Fontconfig</application> to find the installed TrueType
|
---|
| 383 | fonts, you should make symlinks to their directories. Assuming you've
|
---|
| 384 | installed <application>Xorg</application> in the default prefix, run the
|
---|
| 385 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 386 | user:</para>
|
---|
| 387 |
|
---|
| 388 | <screen role="root"><userinput>ln -svn /usr/X11R6/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF &&
|
---|
| 389 | ln -svn /usr/X11R6/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF</userinput></screen>
|
---|
| 390 |
|
---|
[36c3ba1] | 391 | </sect3>
|
---|
| 392 |
|
---|
| 393 | </sect2>
|
---|
| 394 |
|
---|
| 395 | <sect2 role="commands">
|
---|
| 396 | <title>Command Explanations</title>
|
---|
| 397 |
|
---|
| 398 | <para><command>sed -i -e "s@^#include <linux/config.h>@...</command>:
|
---|
[2826127] | 399 | The <application>Linux-Libc-Headers</application> package installed in
|
---|
[36c3ba1] | 400 | LFS installs a <filename>/usr/include/linux/config.h</filename> file
|
---|
| 401 | which is not compatible with userspace applications. The recommended fix
|
---|
| 402 | for applications including this file is to remove it (see <ulink
|
---|
[2826127] | 403 | url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
|
---|
| 404 | linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
|
---|
[bfb7882] | 405 | <command>grep -lr</command> to replace all occurrences. If you desire, just
|
---|
[2826127] | 406 | remove (comment) the line in the appropriate video driver file if you
|
---|
[36c3ba1] | 407 | customized <filename>host.def</filename>.</para>
|
---|
| 408 |
|
---|
| 409 | <para><command>( make World 2>&1 | tee xorg-compile.log
|
---|
| 410 | && exit $PIPESTATUS )</command>: This command runs multiple
|
---|
| 411 | <filename>Makefile</filename>s to completely rebuild the system.
|
---|
| 412 | <parameter>2>&1</parameter> redirects error messages to the
|
---|
| 413 | same location as standard output. The <command>tee</command> command
|
---|
| 414 | allows viewing of the output while logging the results to a file. The
|
---|
[bfb7882] | 415 | parentheses around the command runs the entire command in a subshell
|
---|
[36c3ba1] | 416 | and finally the <command>exit $PIPESTATUS</command> ensures the result
|
---|
| 417 | of the <command>make</command> is returned as the result and not the
|
---|
| 418 | result of the <command>tee</command> command.</para>
|
---|
| 419 |
|
---|
| 420 | <note>
|
---|
| 421 | <para>When rebuilding <application>Xorg</application>, a separate
|
---|
| 422 | command that may be used if only minor changes are made to the sources
|
---|
| 423 | is <command>make Everything</command>. This does not automatically
|
---|
| 424 | remove generated files and only rebuilds those files or programs that
|
---|
| 425 | are out of date.</para>
|
---|
| 426 | </note>
|
---|
| 427 |
|
---|
[b2febe4e] | 428 | <para><command>ln -v -s ...</command>: These commands are present to
|
---|
[36c3ba1] | 429 | enable other (broken) packages to build against
|
---|
| 430 | <application>Xorg</application>, even though the Filesystem Hierarchy
|
---|
| 431 | Standard says: <quote>In general, software must not be installed or
|
---|
| 432 | managed via the above symbolic links. They are intended for utilization
|
---|
| 433 | by users only.</quote></para>
|
---|
| 434 |
|
---|
| 435 | </sect2>
|
---|
| 436 |
|
---|
| 437 | <sect2 role="configuration" id='xorg-config'>
|
---|
| 438 | <title>Configuring Xorg</title>
|
---|
| 439 |
|
---|
| 440 | <para>Edit <filename>/etc/ld.so.conf</filename> and add
|
---|
| 441 | <filename class="directory">/usr/X11R6/lib</filename>. Run:</para>
|
---|
| 442 |
|
---|
| 443 | <indexterm zone="xorg xorg-config">
|
---|
| 444 | <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
|
---|
| 445 | </indexterm>
|
---|
| 446 |
|
---|
| 447 | <screen role="root"><userinput>ldconfig</userinput></screen>
|
---|
| 448 |
|
---|
| 449 | <para>Ensure <filename class="directory">/usr/X11R6/bin</filename>
|
---|
| 450 | and <filename class="directory">/usr/X11R6/lib/pkgconfig</filename>
|
---|
| 451 | are added to your <envar>PATH</envar> and <envar>PKG_CONFIG_PATH</envar>
|
---|
| 452 | environment variables, respectively. Instructions for doing this are
|
---|
| 453 | described in the section <xref linkend='postlfs-config-profile'/>.</para>
|
---|
| 454 |
|
---|
| 455 | <para>Create the <filename>xorg.conf</filename> file with:</para>
|
---|
| 456 |
|
---|
[5ee44e37] | 457 | <screen><userinput>cd ~ &&
|
---|
[36c3ba1] | 458 | Xorg -configure</userinput></screen>
|
---|
| 459 |
|
---|
| 460 | <para>The screen will go black and you may hear some clicking of the monitor.
|
---|
| 461 | This command will create a file, <filename>xorg.conf.new</filename> in your
|
---|
| 462 | home directory.</para>
|
---|
| 463 |
|
---|
| 464 | <indexterm zone="xorg xorg-config">
|
---|
| 465 | <primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
|
---|
| 466 | </indexterm>
|
---|
| 467 |
|
---|
| 468 | <para>Edit <filename>xorg.conf.new</filename> to suit your system. The
|
---|
| 469 | details of the file are located in the xorg.conf man page. Some things
|
---|
| 470 | you may want to do are:</para>
|
---|
| 471 |
|
---|
| 472 | <itemizedlist>
|
---|
| 473 | <listitem>
|
---|
| 474 | <para>Section "Files". Change the order of the font paths searched.
|
---|
| 475 | You may want to put 100dpi fonts ahead of 75dpi fonts if your system
|
---|
| 476 | normally comes up closer to 100 dots per inch. You may want to remove
|
---|
| 477 | some font directories completely.</para>
|
---|
| 478 | </listitem>
|
---|
| 479 | <listitem>
|
---|
| 480 | <para>Section "Module". If you are going to install NVidia
|
---|
| 481 | drivers, remove the "dri" line.</para>
|
---|
| 482 | </listitem>
|
---|
| 483 | <listitem>
|
---|
| 484 | <para>Sections "InputDevice". You may want to change the
|
---|
| 485 | keyboard autorepeat rate by adding
|
---|
| 486 | <option>Option "Autorepeat" "250 30"</option>.</para>
|
---|
| 487 | </listitem>
|
---|
| 488 | <listitem>
|
---|
| 489 | <para>Section "Monitor". Specify the <option>VertRefresh</option>
|
---|
| 490 | and <option>HorizSync</option> values if the system does not
|
---|
| 491 | automatically detect the monitor and its values.</para>
|
---|
| 492 | </listitem>
|
---|
| 493 | <listitem>
|
---|
| 494 | <para>Section "Device". You may want to set some of the options
|
---|
| 495 | available for your selected video driver. A description of the driver
|
---|
| 496 | parameters is in the man page for your driver.</para>
|
---|
| 497 | </listitem>
|
---|
| 498 | <listitem><para>Section "Screen". Add a DefaultDepth statement such as:
|
---|
| 499 | <option>DefaultDepth 24</option>. In the SubSection for your
|
---|
| 500 | default depth, add a modes line such as:
|
---|
| 501 | <option>Modes "1600x1200" "1280x1024" "1024x768"</option>. The first
|
---|
| 502 | mode listed will normally be the starting resolution.</para>
|
---|
| 503 | </listitem>
|
---|
| 504 | </itemizedlist>
|
---|
| 505 |
|
---|
| 506 | <para>Test the system with:</para>
|
---|
| 507 |
|
---|
| 508 | <screen><userinput>X -config ~/xorg.conf.new</userinput></screen>
|
---|
| 509 |
|
---|
| 510 | <para>You will only get a gray background with an X-shaped mouse cursor,
|
---|
| 511 | but it confirms the system is working. Exit with
|
---|
| 512 | <keycap>Control+Alt+Backspace</keycap>. If the system does not work, take
|
---|
| 513 | a look at <filename>/var/log/Xorg.0.log</filename> to see what went
|
---|
| 514 | wrong.</para>
|
---|
| 515 |
|
---|
| 516 | <para>Move the configuration file to its final location:</para>
|
---|
| 517 |
|
---|
| 518 | <screen role="root"><userinput>mv ~/xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
|
---|
| 519 |
|
---|
| 520 | <para>Create <filename>.xinitrc</filename>:</para>
|
---|
| 521 |
|
---|
| 522 | <screen><userinput>cat > ~/.xinitrc << "EOF"
|
---|
| 523 | <literal># Begin .xinitrc file
|
---|
[feeb99a] | 524 | xterm -g 80x40+0+0 &
|
---|
| 525 | xclock -g 100x100-0+0 &
|
---|
[36c3ba1] | 526 | twm</literal>
|
---|
| 527 | EOF</userinput></screen>
|
---|
| 528 |
|
---|
| 529 | <para>This provides an initial screen with an xterm and a clock that is
|
---|
| 530 | managed by a simple window manager, Tab Window Manager. For details of
|
---|
| 531 | <command>twm</command>, see the man page.</para>
|
---|
| 532 |
|
---|
| 533 | <indexterm zone="xorg xorg-config">
|
---|
| 534 | <primary sortas="e-AA.xinitrc">~/.xinitrc</primary>
|
---|
| 535 | </indexterm>
|
---|
| 536 |
|
---|
| 537 | <note>
|
---|
| 538 | <para>When needed, <application>Xorg</application> creates the directory
|
---|
| 539 | <filename>/tmp/.ICE-unix</filename> if it does not exist. If this
|
---|
| 540 | directory is not owned by <systemitem class="username">root</systemitem>,
|
---|
| 541 | <application>Xorg</application> delays startup by a few seconds and also
|
---|
| 542 | appends a warning to the logfile. This also affects startup of other
|
---|
| 543 | applications. To improve performance, it is advisable to manually create
|
---|
| 544 | the directory before <application>Xorg</application> uses it. Add the
|
---|
| 545 | file creation to <filename>/etc/sysconfig/createfiles</filename> that is
|
---|
| 546 | sourced by the <filename>/etc/rc.d/init.d/cleanfs</filename> startup
|
---|
| 547 | script.</para>
|
---|
| 548 |
|
---|
| 549 | <screen role="root"><userinput>cat >> /etc/sysconfig/createfiles << "EOF"
|
---|
| 550 | <literal>/tmp/.ICE-unix dir 1777 root root</literal>
|
---|
| 551 | EOF</userinput></screen>
|
---|
| 552 |
|
---|
| 553 | </note>
|
---|
| 554 |
|
---|
| 555 | <indexterm zone="xorg xorg-config">
|
---|
| 556 | <primary
|
---|
| 557 | sortas="e-etc-sysconfig-createfiles">/etc/sysconfig/createfiles</primary>
|
---|
| 558 | </indexterm>
|
---|
| 559 |
|
---|
| 560 | <para>Start <application>X</application> with:</para>
|
---|
| 561 |
|
---|
| 562 | <screen><userinput>startx</userinput></screen>
|
---|
| 563 |
|
---|
| 564 | <para>to get a basic functional <application>X Window
|
---|
| 565 | System</application>.</para>
|
---|
| 566 |
|
---|
| 567 | <para>At this point, you should check out <xref linkend='x-setup'/> for
|
---|
| 568 | the necessary configuration to make <application>X</application> fully
|
---|
| 569 | functional. Additionally, you can have a look at <xref linkend='x-config'/>
|
---|
| 570 | for information on fine tuning your <application>X</application>
|
---|
| 571 | configuration.</para>
|
---|
| 572 |
|
---|
| 573 | <para>For a list of the package contents and a description of the commands,
|
---|
| 574 | see the sections in the <xref linkend='xfree86-contents'/>.</para>
|
---|
| 575 |
|
---|
| 576 | </sect2>
|
---|
[d5d9ceb] | 577 |
|
---|
[feeb99a] | 578 | </sect1>
|
---|