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