source: x/installing/xorg.xml@ feeb99a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.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 feeb99a was feeb99a, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

XML update for Part VIII (X and friends)

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

  • Property mode set to 100644
File size: 19.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY xorg-download-http "http://freedesktop.org/~xorg/X11R6.7.0/src/">
8 <!ENTITY xorg-download-ftp " ">
9 <!ENTITY xorg-size "70.3 MB">
10 <!ENTITY xorg-buildsize "645 MB">
11 <!ENTITY xorg-time "17.1 SBU">
12]>
13
14<sect1 id="xorg" xreflabel="X.org-&xorg-version;">
15<?dbhtml filename="xorg.html"?>
16<title>Xorg-&xorg-version;</title>
17
18
19<sect2>
20<title>Introduction to <application>Xorg</application></title>
21
22<note><para>There are two packages in BLFS that implement the <application>X</application>
23Window System: <application>Xorg</application> and <application>XFree86</application>.
24These packages are quite similar. In fact, the base system of <application>Xorg</application>
25is <application>XFree86</application>-RC2. The primary difference as of this writing is
26the license provisions of the packages. For someone building a package for their own use,
27these issues are not significant. Most large commercial distributions have decided
28to use the <application>Xorg</application> package, but several still use
29<application>XFree86</application>.</para>
30
31<para>A second reason for the forking of X packages is the stated goals of the
32developers. Some developers were unhappy with the administration and progress of
33<application>XFree86</application>. Xorg's future plans include significant
34improvements to the internals of the system and more frequent releases.</para>
35
36<para><application>XFree86</application> continues to be a solid, conservative
37application with excellent driver support.</para>
38
39<para>Both <application>Xorg</application> and <application>XFree86</application>
40can be installed in the same way, but this section will provide a slightly
41different and more current variation for installation.</para>
42</note>
43
44
45<para><application>Xorg</application> is a freely redistributable open-source
46implementation of the <application>X</application> Window System.
47This application provides a client/server interface between display
48hardware (the mouse, keyboard, and video displays) and the desktop environment,
49while also providing both the windowing infrastructure and a standardized
50application interface (<acronym>API</acronym>).</para>
51
52<sect3><title>Package information</title>
53<itemizedlist spacing='compact'>
54<listitem><para>Download (HTTP): <ulink url="&xorg-download-http;"/></para></listitem>
55<listitem><para>Download (FTP): <ulink url="&xorg-download-ftp;"/></para></listitem>
56<listitem><para>Download size: &xorg-size;</para></listitem>
57<listitem><para>Estimated Disk space required: &xorg-buildsize;</para></listitem>
58<listitem><para>Estimated build time: &xorg-time;</para></listitem></itemizedlist>
59</sect3>
60
61
62<sect3><title><application>Xorg</application> Dependencies</title>
63
64<sect4><title>Required</title>
65<para><xref linkend="libpng"/>, <xref linkend="expat"/>, <xref linkend="freetype2"/> and
66<xref linkend="fontconfig"/>.</para>
67</sect4>
68
69<sect4><title>Optional</title>
70<para><xref linkend="Linux_PAM"/>.</para>
71</sect4>
72
73</sect3>
74
75
76<sect3><title>Download Instructions</title>
77
78<para>There are several files that need to be fetched from the download location:</para>
79<itemizedlist spacing='compact'>
80<listitem><para><filename>X11R6.7.0-src1.tar.gz</filename></para></listitem>
81<listitem><para><filename>X11R6.7.0-src2.tar.gz</filename></para></listitem>
82<listitem><para><filename>X11R6.7.0-src3.tar.gz</filename></para></listitem>
83<listitem><para><filename>X11R6.7.0-src4.tar.gz</filename></para></listitem>
84<listitem><para><filename>X11R6.7.0-src5.tar.gz</filename></para></listitem>
85<listitem><para><filename>X11R6.7.0-src6.tar.gz</filename></para></listitem>
86<listitem><para><filename>X11R6.7.0-src7.tar.gz</filename></para></listitem>
87</itemizedlist>
88
89<para>The first package contains the <application>Xorg</application> libraries and
90support programs, the second contains standard X programs, the third contains the
91X server, the fourth and fifth are fonts, the sixth is normal documentation, and the seventh
92is hardcopy documentation.</para>
93
94<para>To check your downloads for integrity, download the <filename>md5sums</filename>
95file. Then:</para>
96
97<screen><userinput><command>md5sum -c md5sums</command></userinput></screen>
98
99<para>All seven packages should give an OK status.</para>
100</sect3>
101</sect2>
102
103<sect2>
104<title>Installation of <application>Xorg</application></title>
105
106
107<sect3>
108<title>Kernel Compilation Settings</title>
109<para>If you have an Intel P6 (Pentium Pro, Pentium II and later), it is recommended
110that you compile <acronym>MTRR</acronym> (Memory Type Range Registers) support into the kernel.
111The kernel can map Cyrix and AMD <acronym>CPU</acronym>s to the
112<acronym>MTRR</acronym> interface, so selecting this
113option is useful for those processors also. This option is found in the
114"Processor type and features" menu. It can increase performance of
115image write operations 2.5 times or more on <acronym>PCI</acronym> or
116<acronym>AGP</acronym> video cards.</para>
117
118<para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support and
119select the chipset support on your motherboard. If you do not know the chipset,
120you may select all the chip types at the expense of extra kernel size. You can usually
121determine your motherboard's chipset by doing:</para>
122<screen><userinput><command>cat /proc/pci</command></userinput></screen>
123
124<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
125Rendering Manager unless you have a Direct Rendering Infrastructure
126(<acronym>DRI</acronym>)
127supported video card. A complete list of <acronym>DRI</acronym> supported video cards can
128be found at <ulink url="http://dri.sourceforge.net" /> in the Status section.
129Currently, supported cards include those from 3dfx (Voodoo, Banshee), 3Dlabs,
130ATI (Rage Pro, Rage 128,
131Radeon 7X00, Radeon 2), Intel (i810, i815), and Matrox (G200, G400, G450).
132If you do enable <acronym>DRI</acronym> here, make sure you select the video card(s) you want
133to support as a <emphasis>module</emphasis>.</para>
134
135<para>Additionally NVidia provides their own closed source binary drivers,
136which do not make use of <acronym>DRI</acronym>. If you intend to use these drivers,
137do not enable <acronym>DRI</acronym>.</para>
138
139<para>If you made any changes to the kernel configuration, recompile the kernel.</para>
140
141<para>Copy the <filename>arch/i386/boot/bzImage</filename> and <filename>System.map</filename>
142from the kernel build directory to <filename class='directory'>/boot</filename>.
143Edit <filename>/boot/grub/grub.conf</filename> and add the new kernel to the
144boot menu.
145(If you use lilo, edit <filename>/etc/lilo.conf</filename> and run <filename>lilo</filename>.)
146</para>
147
148<note><para>If you build <application>Xorg</application> in a chroot environment,
149make sure the kernel version of the base system and the target system are the same.
150This is especially important if you enabled <acronym>DRI</acronym> support as a module as
151instructed above.</para></note>
152</sect3>
153
154<sect3><title>Setting Up a Shadow Directory</title>
155<para>When building <application>Xorg</application>, you should create
156a shadow directory of symbolic links for the compiled code. To do that, we first
157make the <application>lndir</application>. Starting from the
158<filename class='directory'>xc</filename> directory:</para>
159
160<screen><userinput><command>pushd config/util &amp;&amp;
161make -f Makefile.ini lndir &amp;&amp;
162cp lndir /usr/bin/ &amp;&amp;
163popd</command></userinput></screen>
164
165<para>Now create the shadow tree:</para>
166
167<screen><userinput><command>mkdir ../xcbuild &amp;&amp;
168cd ../xcbuild &amp;&amp;
169lndir ../xc</command></userinput></screen>
170</sect3>
171
172<sect3><title>Creating <filename>host.def</filename></title>
173<para>The next step is to create the <filename>config/cf/host.def</filename> file.
174The documentation for <application>Xorg</application> indicates that the
175application will build without a <filename>host.def</filename> file, but
176the included libraries for <application>fontconfig</application> and
177<application>freetype2</application> do not build properly on a base LFS system.
178Therefore, you must specify that these libraries, as well as others, should be
179imported from the system.</para>
180
181<note><para><filename>config/cf/host.def</filename> is a C file, not a shell
182script. Ensure the comments delimited by /* ... */ are
183balanced when modifying the file. </para></note>
184
185
186<screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command>
187/* Begin Xorg host.def file */
188
189/* System Related Information. If you read and configure only one
190 * section then it should be this one. The Intel architecture defaults are
191 * set for a i686 and higher. Axp is for the Alpha architecture and Ppc is
192 * for the Power PC. AMD64 is for the Opteron processor. Note that there have
193 * been reports that the Ppc optimization line causes segmentation faults during
194 * build. If that happens, try building without the DefaultGcc2PpcOpt line. ***********/
195
196/* #define DefaultGcc2i386Opt -O2 -fno-strength-reduce -fno-strict-aliasing -march=i686 */
197/* #define DefaultGccAMD64Opt -O2 -fno-strength-reduce -fno-strict-aliasing */
198/* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */
199/* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */
200
201#define HasFreetype2 YES
202#define HasFontconfig YES
203#define HasExpat YES
204#define HasLibpng YES
205#define HasZlib YES
206
207/*
208 * Which drivers to build. When building a static server, each of these
209 * will be included in it. When building the loadable server each of these
210 * modules will be built.
211 *
212#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
213 neomagic i740 tdfx savage \
214 cirrus vmware tseng trident chips apm \
215 GlideDriver fbdev i128 \
216 ati AgpGartDrivers DevelDrivers ark cyrix \
217 siliconmotion \
218 vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
219*/
220
221/*
222 * Select the XInput devices you want by uncommenting this.
223 *
224#define XInputDrivers mouse keyboard acecad calcomp citron \
225 digitaledge dmc dynapro elographics \
226 microtouch mutouch penmount spaceorb summa \
227 wacom void magictouch aiptek
228 */
229
230/* Most installs will only need this */
231
232#define XInputDrivers mouse keyboard
233
234
235/* End Xorg host.def file */
236<command>EOF</command></userinput></screen>
237
238<para>There are several other options that you may want to consider. A well documented
239example file is <filename>config/cf/xorgsite.cf</filename>.</para>
240</sect3>
241
242<sect3>
243<title>Build Commands</title>
244<para>Install <application>Xorg</application> by running the following commands:</para>
245
246
247<screen><userinput><command>( make World 2&gt;&amp;1 | tee xorg-compile.log &amp;&amp; exit $PIPESTATUS ) &amp;&amp;
248make install &amp;&amp;
249make install.man &amp;&amp;
250ln -sf ../X11R6/bin /usr/bin/X11 &amp;&amp;
251ln -sf ../X11R6/lib/X11 /usr/lib/X11 &amp;&amp;
252ln -sf ../X11R6/include/X11 /usr/include/X11</command></userinput></screen>
253
254</sect3>
255
256<sect3>
257<title>Updating Direct Rendering Infrastructure (<acronym>DRI</acronym>)</title>
258<para>If you have one of the supported <acronym>DRI</acronym> cards and
259have enabled <acronym>DRI</acronym> kernel modules as explained
260above, you now need to update the kernel modules to ensure they are compatible with the
261current version of <application>Xorg</application>. To do this, perform the following:</para>
262
263<screen><userinput><command>cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel &amp;&amp;
264make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux &amp;&amp;
265mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ &amp;&amp;
266cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \
267 /lib/modules/`uname -r`/kernel/drivers/char/drm/ &amp;&amp;
268depmod -a</command></userinput></screen>
269
270<warning><para>If you recompile or upgrade your kernel, you will need to re-copy the
271appropriate driver module(s)
272to the kernel module library and rerun the <command>depmod -a</command> command.</para></warning>
273
274<note><para>If you created <acronym>AGP</acronym> support as a module when compiling
275the kernel, you may have to add a line to <filename>/etc/modules.conf</filename> to ensure
276the agpgart module is loaded. For instance, the <acronym>AGP</acronym> version of the
277Radeon video card will use the <filename>radeon.o</filename> driver. It will
278need to have the line <screen>below radeon agpgart</screen> in
279<filename>/etc/modules.conf</filename> to enable <acronym>DRI</acronym> support.</para></note>
280</sect3>
281</sect2>
282
283<sect2>
284<title>Command explanations</title>
285
286<para><command>( make World 2&gt;&amp;1 | tee xorg-compile.log
287 &amp;&amp; exit $PIPESTATUS )</command>:
288This command runs multiple makefiles to completely rebuild the system.
289<parameter>2&gt;&amp;1</parameter> redirects error messages
290to the same location as standard output. The <command>tee</command> command
291allows viewing of the output while logging the results to a file. The parentheses
292around the command runs the entire comand in a subshell and finally the
293<command>exit $PIPESTATUS</command> ensures the result of the <command>make</command>
294is returned as the result and not the result of the <command>tee</command> command.</para>
295
296<note><para>When rebuilding <application>Xorg</application>, a separate command that may
297be used if only minor changes are made to the sources is <command>make
298Everything</command>. This does not automatically remove generated
299files and only rebuilds those files or programs that are out
300of date.</para></note>
301
302<para><screen><command>ln -sf ../X11R6/bin /usr/bin/X11
303ln -sf ../X11R6/lib/X11 /usr/lib/X11
304ln -sf ../X11R6/include/X11 /usr/include/X11</command></screen>
305These commands are present to enable other (broken) packages to build
306against <application>Xorg</application>. We do this even though the
307Filesystem Hierarchy Standard says:
308"In general, software must not be installed or managed via the above
309symbolic links. They are intended for utilization by users only."</para>
310
311<para><command>make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux</command>: This builds the
312<application>Xorg</application> compatible kernel modules using the same compiler used to compile
313the kernel.</para>
314
315<para><command>cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o
316/lib/modules/`uname -r`/kernel/drivers/char/drm/</command>: Put the kernel
317module(s) where the kernel can find them. You only need to copy the driver you
318need to support your video card.</para>
319
320<para><command>depmod -a</command>: Update the modules.dep file for module
321management.</para>
322
323</sect2>
324
325<sect2>
326<title>Configuring Xorg</title>
327
328<para>Edit <filename>/etc/ld.so.conf</filename> and add
329<filename class="directory">/usr/X11R6/lib</filename>.
330Run:</para> <screen><userinput><command>ldconfig</command></userinput></screen>
331
332<para>Ensure <filename class='directory'>/usr/X11R6/bin</filename> is added to your
333<envar>PATH</envar> environment variable. Instructions for doing this are described
334in the section "<xref linkend='postlfs-config-profile'/>."</para>
335
336<para>Expand the <envar>PKG_CONFIG_PATH</envar> so that other packages
337can find <application>X</application> libraries. Procedures for this are also
338described in the section "<xref linkend='postlfs-config-profile'/>."</para>
339
340<para>Set up your mouse:
341<screen><userinput><command>ln -s psaux /dev/mouse</command></userinput></screen>
342
343Adjust the symbolic link as necessary for other types of mice. For instance,
344a serial mouse on the first serial port would be linked to ttyS1.</para>
345
346<para>Create the <filename>xorg.conf</filename> file with:
347<screen><userinput><command>cd ~
348Xorg -configure</command></userinput></screen>
349The screen will go black and you may hear some clicking of the monitor. This
350command will create a file, <filename>xorg.conf.new</filename> in your home
351directory.</para>
352
353<para>Edit <filename>xorg.conf.new</filename> to suit your system. The
354details of the file are located in the man
355page <command>man xorg.conf</command>. Some things you may want to
356do are:</para>
357
358<itemizedlist>
359
360<listitem><para>Section "Files". Change the order of the font paths searched.
361You may want to put 100dpi fonts ahead of 75dpi fonts if your system normally
362comes up closer to 100 dots per inch. You may want to remove some font
363directories completely.</para></listitem>
364
365<listitem><para>Section "Monitor". Specify the <parameter>VertRefresh</parameter>
366and <parameter>HorizSync</parameter> values if the system does not automatically
367detect the monitor and its values.</para></listitem>
368
369<listitem><para>Section "InputDevice". You may want to change the keyboard
370autorepeat rate by
371adding <parameter>Option "Autorepeat" "250 30"</parameter>.</para></listitem>
372
373<listitem><para>Section "Device". You may want to set some of the options
374available for your selected video driver. A description of the driver
375parameters is in the man page for your driver.</para></listitem>
376
377<listitem><para>Section "Screen". Add a DefaultDepth statement such
378as: <parameter>DefaultDepth 16</parameter>. In the SubSection for your
379default depth, add a modes line such
380as: <parameter> Modes "1280x1024" "1024x768"</parameter>.
381The first mode listed will normally be the starting
382resolution.</para></listitem>
383
384</itemizedlist>
385<para>Test the system with:
386<screen><userinput><command>X -xf86config ~/xorg.conf.new</command></userinput></screen>
387You will only get a gray background with an X-shaped mouse cursor, but it
388confirms the system is working. Exit with Control-Alt-Backspace. If the
389system does not work, take a look
390at <filename>/var/log/Xorg.0.log</filename> to see what went
391wrong.</para>
392
393<para>Move the configuration file to its final location:</para>
394<screen><userinput><command>mv ~/xorg.conf.new /etc/X11/xorg.conf</command></userinput></screen>
395
396<para>Create <filename>.xinitrc</filename>:
397<screen><userinput><command>cat &gt; ~/.xinitrc &lt;&lt; "EOF"</command>
398# Begin .xinitrc file
399xterm -g 80x40+0+0 &amp;
400xclock -g 100x100-0+0 &amp;
401twm
402<command>EOF</command></userinput></screen>
403This provides an initial screen with an xterm and a clock that is managed by a
404simple window manager, Tab Window Manager. For details of twm, see the
405man page.</para>
406
407<note>
408
409<para>When needed, <application>Xorg</application> creates the directory
410<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is
411not owned by root, <application>Xorg</application> delays startup by a few seconds
412and also appends a warning to the logfile. This also affects startup of other
413applications. To improve performance, it is advisable to manually create the directory
414before Xorg uses it. Add the file creation to <filename>/etc/sysconfig/createfiles</filename>
415that is sourced by the
416<filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
417
418<screen><userinput><command>cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"</command>
419/tmp/.ICE-unix dir 1777 root root
420<command>EOF</command></userinput></screen>
421
422</note>
423
424<para>Start <application>X</application> with:
425<screen><userinput><command>startx</command></userinput></screen>
426to get a basic functional <application>X</application> Window System.</para>
427
428<para>At this point, you should check out the X Window Components at
429<xref linkend='x-setup'/>.</para>
430
431</sect2>
432</sect1>
Note: See TracBrowser for help on using the repository browser.