source: x/installing/xorg7.xml@ 71df408

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 71df408 was 71df408, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format the x/installing chapter

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

  • Property mode set to 100644
File size: 10.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="xorg7" xreflabel="Xorg-&xorg-version;">
9 <?dbhtml filename="xorg7.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Introduction to Xorg-&xorg-version;</title>
17
18 <indexterm zone="xorg7">
19 <primary sortas="a-xorg7">Xorg</primary>
20 </indexterm>
21
22
23 <para>
24 <application>Xorg</application> is a freely redistributable,
25 open-source implementation of the <application>X</application> Window
26 System. This system provides a client/server interface between display
27 hardware (the mouse, keyboard, and video displays) and the desktop
28 environment, while also providing both the windowing infrastructure and a
29 standardized application interface (API).
30 </para>
31
32 <para condition="html" role="usernotes">User Notes:
33 <ulink url='&blfs-wiki;/Xorg7'/></para>
34
35 <bridgehead renderas="sect3">Xorg Download and Installation
36 Instructions</bridgehead>
37
38 <para>
39 Xorg-7.0 introduced a completely auto-tooled, modular build system.
40 With the new modular build system, it is no longer possible to download
41 the entire package in a single file. In fact, there will be well over 100
42 packages that need to be fetched from the download location. To assist
43 with such a large task, installing <xref linkend="wget"/> is strongly
44 recommended for downloading the needed files. A complete
45 <application>wget</application> file list is provided for each page
46 that includes multiple packages.
47 </para>
48
49 <para>
50 Given the number of packages available, deciding which packages you
51 need to install for your particular setup may seem a bit overwhelming at
52 first. Take a look at <ulink url=
53 "http://wiki.x.org/wiki/ModuleDescriptions">this page</ulink>
54 and <ulink url=
55 "http://lists.x.org/archives/xorg-modular/2005-November/000801.html">
56 this thread</ulink>
57 to get an idea of what you will need. If you are unsure, you should
58 install all packages at the cost of extra disk space.
59 </para>
60
61 <note>
62 <para>
63 Even if you intend to download only the necessary packages, you
64 should download the wget file lists. The list of files are ordered by
65 dependency, and the package versions listed in the files are known to
66 work well with each other. Further, the wget file lists contain comments
67 for specific packages that are deprecated or are not recommended to
68 install. Newer packages are likely intended for the
69 next release of <application>Xorg</application> and have already proved
70 to be incompatible with current versions of software installed in BLFS.
71 The installed size of <application>Xorg</application> can be reduced
72 considerably by installing only the packages that you will need and use,
73 however, the BLFS book cannot account for all dependencies and build
74 options for the individual <application>Xorg</application> packages.
75 The instructions assume that all packages have been built. A
76 <ulink url="&blfs-wiki;/Xorg7">wiki</ulink>
77 page containing dependency information is under development. You are
78 encouraged to add to these pages if you discover additional information
79 that may be helpful to other users who selectively install individual
80 packages.
81 </para>
82 </note>
83
84 <para>
85 Additionally, because of the large number of repetitive commands,
86 you are encouraged to partially automate the build. Instructions have been
87 given that utilize the <xref linkend="sudo"/> package. It is recommended
88 that you use the <parameter>:NOPASSWD</parameter> configuration option
89 for the user that will be building the xorg packages.
90 </para>
91
92 <sect2 id="xorg-env" xreflabel="Xorg build environment">
93 <title>Setting up the Xorg Build Environment</title>
94
95 <note>
96 <para>
97 The following instructions assume that the shell
98 startup files have been set up as described in
99 <xref linkend="postlfs-config-profile" />.
100 </para>
101 </note>
102
103 <para>
104 First, you'll need to create a working directory:
105 </para>
106
107<screen><userinput>mkdir xc &amp;&amp;
108cd xc</userinput></screen>
109
110 <para>
111 As with previous releases of the X Window System, it may be
112 desirable to install <application>Xorg</application> into an alternate
113 prefix. This is no longer common practice among Linux distributions.
114 The common installation prefix for <application>Xorg</application> on
115 Linux is <filename class="directory">/usr</filename>. There is no
116 standard alternate prefix, nor is there any exception in the current
117 revision of the Filesystem Hierarchy Standard for Release 7 of the X
118 Window System. Alan Coopersmith of Sun Microsystems, once
119 stated "At Sun, we were using
120 <filename class="directory">/usr/X11</filename> and plan to stick with
121 it." Only the <filename class="directory">/opt/*</filename> prefix or
122 the <filename class="directory">/usr</filename> prefix adhere to the
123 current FHS guidelines.
124 </para>
125
126 <para>
127 Choose your installation prefix, and set the <envar>XORG_PREFIX</envar>
128 variable with the following command:
129 </para>
130
131<screen><userinput>export XORG_PREFIX="<replaceable>&lt;PREFIX&gt;</replaceable>"</userinput></screen>
132
133 <para>
134 Throughout these instructions, you will use the following
135 <command>configure</command> switches for all of the packages. Create the
136 <envar>XORG_CONFIG</envar> variable to use for this parameter
137 substitution:
138 </para>
139
140<screen><userinput>export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
141 --localstatedir=/var --disable-static"</userinput></screen>
142
143 <para>
144 Create an <filename>/etc/profile.d/xorg.sh</filename> configuration
145 file containing these variables as the
146 <systemitem class="username">root</systemitem> user:
147 </para>
148
149<screen role="root"><userinput>cat &gt; /etc/profile.d/xorg.sh &lt;&lt; EOF
150<literal>XORG_PREFIX="$XORG_PREFIX"
151XORG_CONFIG="--prefix=\$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var --disable-static"
152export XORG_PREFIX XORG_CONFIG</literal>
153EOF
154chmod 644 /etc/profile.d/xorg.sh</userinput></screen>
155
156 <note>
157 <para>
158 There is some confustion about the above 'here' document.
159 The backslash in front of the dollar sign is correct. Bash
160 will remove it when creating /etc/profile.d/xorg.sh. However, if
161 you are creating the file with an editor, a copy and paste operation
162 will not remove the baskslash. It must then be removed manually.
163 </para>
164 </note>
165
166 <para>
167 If you've installed <xref linkend="sudo"/>, ensure that
168 <envar>XORG_PREFIX</envar> and <envar>XORG_CONFIG</envar> are available
169 in the <application>sudo</application> environment. As the
170 <systemitem class="username">root</systemitem> user, run the following
171 command:
172 </para>
173
174<screen role="root"><userinput>cat &gt; /etc/sudoers.d/xorg &lt;&lt; EOF
175<literal>Defaults env_keep += XORG_PREFIX
176Defaults env_keep += XORG_CONFIG</literal>
177EOF</userinput></screen>
178
179 <note>
180 <para>
181 If you've decided to use the standard <filename
182 class="directory">/usr</filename> prefix, you can omit the remainder of
183 this page and continue at <xref linkend='util-macros'/>.
184 </para>
185 </note>
186
187 <para>
188 If you've decided to <emphasis>not</emphasis> use the standard
189 prefix, be sure to add <filename
190 class="directory">$XORG_PREFIX/bin</filename> to your <envar>PATH</envar>
191 environment variable, and <filename class="directory">
192 $XORG_PREFIX/lib/pkgconfig</filename> and <filename class="directory">
193 $XORG_PREFIX/share/pkgconfig</filename> to your
194 <envar>PKG_CONFIG_PATH</envar> variable. It is also helpful to specify
195 additional search paths for <command>gcc</command> and an include
196 directory for the <command>aclocal</command> program. Issue the
197 following commands as the <systemitem class="username">root</systemitem>
198 user:
199 </para>
200
201<screen role="root"><userinput>cat &gt;&gt; /etc/profile.d/xorg.sh &lt;&lt; "EOF"
202<literal>
203pathappend $XORG_PREFIX/bin PATH
204pathappend $XORG_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
205pathappend $XORG_PREFIX/share/pkgconfig PKG_CONFIG_PATH
206
207pathappend $XORG_PREFIX/lib LIBRARY_PATH
208pathappend $XORG_PREFIX/include C_INCLUDE_PATH
209pathappend $XORG_PREFIX/include CPLUS_INCLUDE_PATH
210
211ACLOCAL="aclocal -I $XORG_PREFIX/share/aclocal"
212
213export PATH PKG_CONFIG_PATH ACLOCAL LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH</literal>
214EOF</userinput></screen>
215
216 <para>
217 The script above needs to be activated. Normally it will be
218 automatic at login, but to activate it now, as a regular user, run:
219 </para>
220
221<screen><userinput>source /etc/profile.d/xorg.sh</userinput></screen>
222
223 <para>
224 You should also add
225 <filename class="directory"> $XORG_PREFIX/lib</filename> to the
226 <filename>/etc/ld.so.conf</filename> file. Again, as the
227 <systemitem class="username">root</systemitem> user, issue the following
228 command:
229 </para>
230
231<screen role="root"><userinput>echo "$XORG_PREFIX/lib" >> /etc/ld.so.conf</userinput></screen>
232
233 <para>
234 You should also modify
235 <filename>/etc/man_db.conf</filename>, adding appropriate
236 MANDATORY_MANPATH, MANPATH_MAP, and MANDB_MAP entries following the
237 examples for <filename class="directory">/usr/X11R6</filename>. Issue the
238 following command as the <systemitem class="username">root</systemitem>
239 user:
240 </para>
241
242<screen role="root"><userinput>sed "s@<replaceable>/usr/X11R6</replaceable>@$XORG_PREFIX@g" -i /etc/man_db.conf</userinput></screen>
243
244 <para>
245 Some applications look for shared files in <filename
246 class="directory">/usr/share/X11</filename>. Create a symbolic link to
247 the proper location as the <systemitem class="username">root</systemitem>
248 user:
249 </para>
250
251<screen role="root"><userinput>ln -svf $XORG_PREFIX/share/X11 /usr/share/X11</userinput></screen>
252
253 <para>
254 If building KDE, some cmake files look for Xorg in places other than
255 $XORG_PREFIX. Allow cmake to find Xorg with:
256 </para>
257
258<screen role="root"><userinput>ln -svf $XORG_PREFIX /usr/X11R6</userinput></screen>
259<!--
260 <para>
261 Finally, if building on x86_64, you will need to create the
262 <filename class="directory">$XORG_PREFIX/lib</filename> directory and the
263 <filename>$XORG_PREFIX/lib64</filename> symlink. Again, as the
264 <systemitem class="username">root</systemitem> user, issue the following
265 commands:
266 </para>
267
268<screen role="root"><userinput>install -v -m755 -d $XORG_PREFIX &amp;&amp;
269install -v -m755 -d $XORG_PREFIX/lib &amp;&amp;
270ln -sf lib $XORG_PREFIX/lib64</userinput></screen>
271-->
272 </sect2>
273
274</sect1>
Note: See TracBrowser for help on using the repository browser.