source: x/installing/xorg.xml@ 9a2fba9

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 9a2fba9 was 9a2fba9, checked in by Bruce Dubbs <bdubbs@…>, 18 years ago

Remove 2nd installation of lndir in xorg and xfree86.

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

  • Property mode set to 100644
File size: 22.1 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
233popd</userinput></screen>
234
235 <para>Now create the shadow tree:</para>
236
237<screen><userinput>mkdir ../xcbuild &amp;&amp;
238cd ../xcbuild &amp;&amp;
239../xc/config/util/lndir ../xc</userinput></screen>
240
241 </sect3>
242
243 <sect3>
244 <title>Creating 'host.def'</title>
245
246 <para>The next step is to create the
247 <filename>config/cf/host.def</filename> file. The documentation for
248 <application>Xorg</application> indicates that the application will
249 build without a <filename>host.def</filename> file, but the included
250 libraries for <application>Fontconfig</application> and
251 <application>FreeType2</application> do not build properly on a base
252 LFS system. Therefore, you must specify that these libraries, as well
253 as others, should be imported from the system.</para>
254
255 <note>
256 <para><filename>config/cf/host.def</filename> is a C file, not a
257 shell script. Ensure the comments delimited by /* ... */ are balanced
258 when modifying the file.</para>
259 </note>
260
261<screen><userinput>cat &gt; config/cf/host.def &lt;&lt; "EOF"
262<literal>/* Begin Xorg host.def file */
263
264/* System Related Information. If you read and configure only one
265 * section then it should be this one. The Intel architecture defaults
266 * are set for a i686 and higher. Axp is for the Alpha architecture
267 * and Ppc is for the Power PC. AMD64 is for the Opteron processor.
268 * Note that there have been reports that the Ppc optimization line
269 * causes segmentation faults during build. If that happens, try
270 * building without the DefaultGcc2PpcOpt line. ***********/
271
272/* #define DefaultGcc2i386Opt -O2 -fno-strength-reduce \
273 -fno-strict-aliasing -march=i686 */
274/* #define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce \
275 -fno-strict-aliasing */
276/* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */
277/* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */
278
279#define HasFreetype2 YES
280#define HasFontconfig YES
281#define HasExpat YES
282#define HasLibpng YES
283#define HasZlib YES
284
285/*
286 * Comment out the following define if you would prefer to install the
287 * fonts into /usr/X11R6/lib/X11/fonts. /usr/share/fonts is in
288 * fontconfig's default font search path.
289 */
290
291#define FontDir /usr/share/fonts
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/* End Xorg host.def file */</literal>
338EOF</userinput></screen>
339
340 <para>There are several other options that you may want to consider.
341 A well documented example file is
342 <filename>config/cf/xorgsite.def</filename>.</para>
343
344 </sect3>
345
346 <sect3>
347 <title>Build Commands</title>
348
349 <para>Install <application>Xorg</application> by running the
350 following commands:</para>
351
352<screen><userinput>sed -i -e "s@^#include &lt;linux/config.h&gt;@/* &amp; */@" \
353 `grep -lr linux/config.h *` &amp;&amp;
354( make World 2&gt;&amp;1 | tee xorg-compile.log &amp;&amp; exit $PIPESTATUS )</userinput></screen>
355
356 <para>Again as the <systemitem class="username">root</systemitem>
357 user:</para>
358
359<screen role="root"><userinput>make install &amp;&amp;
360make install.man &amp;&amp;
361ln -v -s ../X11R6/bin /usr/bin/X11 &amp;&amp;
362ln -v -s ../X11R6/lib/X11 /usr/lib/X11 &amp;&amp;
363ln -v -s ../X11R6/include/X11 /usr/include/X11</userinput></screen>
364
365 </sect3>
366
367 </sect2>
368
369 <sect2 role="commands">
370 <title>Command Explanations</title>
371
372 <para><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@...</command>:
373 The <application>Linux-Libc-Headers</application> package installed in
374 LFS installs a <filename>/usr/include/linux/config.h</filename> file
375 which is not compatible with userspace applications. The recommended fix
376 for applications including this file is to remove it (see <ulink
377 url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
378 linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
379 <command>grep -lr</command> to replace all occurrences. If you desire, just
380 remove (comment) the line in the appropriate video driver file if you
381 customized <filename>host.def</filename>.</para>
382
383 <para><command>( make World 2&gt;&amp;1 | tee xorg-compile.log
384 &amp;&amp; exit $PIPESTATUS )</command>: This command runs multiple
385 <filename>Makefile</filename>s to completely rebuild the system.
386 <parameter>2&gt;&amp;1</parameter> redirects error messages to the
387 same location as standard output. The <command>tee</command> command
388 allows viewing of the output while logging the results to a file. The
389 parentheses around the command runs the entire command in a subshell
390 and finally the <command>exit $PIPESTATUS</command> ensures the result
391 of the <command>make</command> is returned as the result and not the
392 result of the <command>tee</command> command.</para>
393
394 <note>
395 <para>When rebuilding <application>Xorg</application>, a separate
396 command that may be used if only minor changes are made to the sources
397 is <command>make Everything</command>. This does not automatically
398 remove generated files and only rebuilds those files or programs that
399 are out of date.</para>
400 </note>
401
402 <para><command>ln -v -s ...</command>: These commands are present to
403 enable other (broken) packages to build against
404 <application>Xorg</application>, even though the Filesystem Hierarchy
405 Standard says: <quote>In general, software must not be installed or
406 managed via the above symbolic links. They are intended for utilization
407 by users only.</quote></para>
408
409 </sect2>
410
411 <sect2 role="configuration" id='xorg-config'>
412 <title>Configuring Xorg</title>
413
414 <para>Edit <filename>/etc/ld.so.conf</filename> and add
415 <filename class="directory">/usr/X11R6/lib</filename>. Run:</para>
416
417 <indexterm zone="xorg xorg-config">
418 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
419 </indexterm>
420
421<screen role="root"><userinput>ldconfig</userinput></screen>
422
423 <para>Ensure <filename class="directory">/usr/X11R6/bin</filename>
424 and <filename class="directory">/usr/X11R6/lib/pkgconfig</filename>
425 are added to your <envar>PATH</envar> and <envar>PKG_CONFIG_PATH</envar>
426 environment variables, respectively. Instructions for doing this are
427 described in the section <xref linkend='postlfs-config-profile'/>.</para>
428
429 <para>Create the <filename>xorg.conf</filename> file with:</para>
430
431<screen><userinput>cd ~ &amp;&amp;
432Xorg -configure</userinput></screen>
433
434 <para>The screen will go black and you may hear some clicking of the monitor.
435 This command will create a file, <filename>xorg.conf.new</filename> in your
436 home directory.</para>
437
438 <indexterm zone="xorg xorg-config">
439 <primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
440 </indexterm>
441
442 <para>Edit <filename>xorg.conf.new</filename> to suit your system. The
443 details of the file are located in the xorg.conf man page. Some things
444 you may want to do are:</para>
445
446 <itemizedlist>
447 <listitem>
448 <para>Section "Files". Change the order of the font paths searched.
449 You may want to put 100dpi fonts ahead of 75dpi fonts if your system
450 normally comes up closer to 100 dots per inch. You may want to remove
451 some font directories completely.</para>
452 </listitem>
453 <listitem>
454 <para>Section "Module". If you are going to install NVidia
455 drivers, remove the "dri" line.</para>
456 </listitem>
457 <listitem>
458 <para>Sections "InputDevice". You may want to change the
459 keyboard autorepeat rate by adding
460 <option>Option "Autorepeat" "250 30"</option>.</para>
461 </listitem>
462 <listitem>
463 <para>Section "Monitor". Specify the <option>VertRefresh</option>
464 and <option>HorizSync</option> values if the system does not
465 automatically detect the monitor and its values.</para>
466 </listitem>
467 <listitem>
468 <para>Section "Device". You may want to set some of the options
469 available for your selected video driver. A description of the driver
470 parameters is in the man page for your driver.</para>
471 </listitem>
472 <listitem><para>Section "Screen". Add a DefaultDepth statement such as:
473 <option>DefaultDepth 24</option>. In the SubSection for your
474 default depth, add a modes line such as:
475 <option>Modes "1600x1200" "1280x1024" "1024x768"</option>. The first
476 mode listed will normally be the starting resolution.</para>
477 </listitem>
478 </itemizedlist>
479
480 <para>Test the system with:</para>
481
482<screen><userinput>X -config ~/xorg.conf.new</userinput></screen>
483
484 <para>You will only get a gray background with an X-shaped mouse cursor,
485 but it confirms the system is working. Exit with
486 <keycap>Control+Alt+Backspace</keycap>. If the system does not work, take
487 a look at <filename>/var/log/Xorg.0.log</filename> to see what went
488 wrong.</para>
489
490 <para>Move the configuration file to its final location:</para>
491
492<screen role="root"><userinput>mv ~/xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
493
494 <para>Create <filename>.xinitrc</filename>:</para>
495
496<screen><userinput>cat &gt; ~/.xinitrc &lt;&lt; "EOF"
497<literal># Begin .xinitrc file
498xterm -g 80x40+0+0 &amp;
499xclock -g 100x100-0+0 &amp;
500twm</literal>
501EOF</userinput></screen>
502
503 <para>This provides an initial screen with an xterm and a clock that is
504 managed by a simple window manager, Tab Window Manager. For details of
505 <command>twm</command>, see the man page.</para>
506
507 <indexterm zone="xorg xorg-config">
508 <primary sortas="e-AA.xinitrc">~/.xinitrc</primary>
509 </indexterm>
510
511 <note>
512 <para>When needed, <application>Xorg</application> creates the directory
513 <filename>/tmp/.ICE-unix</filename> if it does not exist. If this
514 directory is not owned by <systemitem class="username">root</systemitem>,
515 <application>Xorg</application> delays startup by a few seconds and also
516 appends a warning to the logfile. This also affects startup of other
517 applications. To improve performance, it is advisable to manually create
518 the directory before <application>Xorg</application> uses it. Add the
519 file creation to <filename>/etc/sysconfig/createfiles</filename> that is
520 sourced by the <filename>/etc/rc.d/init.d/cleanfs</filename> startup
521 script.</para>
522
523<screen role="root"><userinput>cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"
524<literal>/tmp/.ICE-unix dir 1777 root root</literal>
525EOF</userinput></screen>
526
527 </note>
528
529 <indexterm zone="xorg xorg-config">
530 <primary
531 sortas="e-etc-sysconfig-createfiles">/etc/sysconfig/createfiles</primary>
532 </indexterm>
533
534 <para>Start <application>X</application> with:</para>
535
536<screen><userinput>startx</userinput></screen>
537
538 <para>to get a basic functional <application>X Window
539 System</application>.</para>
540
541 <para>At this point, you should check out <xref linkend='x-setup'/> for
542 the necessary configuration to make <application>X</application> fully
543 functional. Additionally, you can have a look at <xref linkend='x-config'/>
544 for information on fine tuning your <application>X</application>
545 configuration.</para>
546
547 <para>For a list of the package contents and a description of the commands,
548 see the sections in the <xref linkend='xfree86-contents'/>.</para>
549
550 </sect2>
551
552</sect1>
Note: See TracBrowser for help on using the repository browser.