source: x/installing/xorg.xml@ d9c80e1

10.0 10.1 11.0 11.1 11.2 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 krejzi/svn lazarus nosym perl-modules plabs/python-mods qt5new systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since d9c80e1 was d9c80e1, checked in by Randy McMurchy <randy@…>, 17 years ago

Removed excess EOL whitespace from all package instructions in the 'x' chapters

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5727 af4574ff-66df-0310-9fd7-8a98e5e911e0

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