source: x/installing/xorg.xml@ 3f5f915

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3f5f915 was 3f5f915, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Typo fix. X.

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

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