source: x/installing/xorg.xml@ fb0480d5

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 fb0480d5 was fb0480d5, checked in by Igor Živković <igor@…>, 19 years ago

Enabled building Xprint libraries since some precompiled binaries are
linked against them, reported by Thomas Trepl.

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

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