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