source: x/installing/xorg-config.xml@ b960e3ec

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 b960e3ec was b960e3ec, checked in by Ken Moffat <ken@…>, 12 years ago

Fix 'other' (g-) indexing, apart from truetype - move that to the end of the section. Also correct xorriso (prog) and bazaar (package).

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

  • Property mode set to 100644
File size: 15.5 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="xorg-config">
9 <?dbhtml filename="xorg-config.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Xorg-&xorg7-release; Testing and Configuration</title>
17
18 <indexterm zone="xorg-config">
19 <primary sortas="g-configuring-xorg">Configuring Xorg</primary>
20 </indexterm>
21
22 <sect2 id='X11-testing' xreflabel="Testing Xorg">
23 <title>Testing Xorg</title>
24
25 <para>To test the <application>Xorg</application> installation, issue
26 <userinput>startx</userinput>. This command brings up a rudimentary window
27 manager called <emphasis>twm</emphasis> with three xterm windows and one
28 xclock window. The xterm window in the upper left is a login terminal and
29 running <emphasis>exit</emphasis> from this terminal will exit the
30 <application>X Window</application> session. The third xterm window may be
31 obscured on your system by the other two xterms.</para>
32
33 <para>Generally, there is no specific configuration required for
34 <application>Xorg</application>, but customization is possible. For details
35 see <xref linkend='xconfig'/> below.</para>
36
37 </sect2>
38
39 <sect2 role="configuration" id='checking-dri' xreflabel="Checking the DRI installation">
40 <title>Checking the Direct Rendering Infrastructure (DRI) Installation</title>
41
42 <para>DRI is a framework for allowing software to access graphics hardware
43 in a safe and efficient manner. It is installed in <application>X</application>
44 by default (using <application>MesaLib</application>) if you have a supported
45 video card.</para>
46
47 <para>To check if DRI is installed properly, check the log file
48 <filename>/var/log/Xorg.0.log</filename> for statements like:</para>
49
50<screen><literal>(II) R128(0): Direct rendering enabled</literal></screen>
51
52 <note><para>DRI configuration may differ if you are using alternate
53 drivers, such as those from
54 <ulink url="http://www.nvidia.com/page/home.html">NVIDIA</ulink> or
55 <ulink url="http://www.ati.com/">ATI</ulink>.</para>
56 </note>
57
58 <para>Although all users can use software acceleration, any hardware
59 acceleration (DRI2) is only available to
60 <systemitem class="username">root</systemitem> and members of the
61 <systemitem class="groupname">video</systemitem> group.</para>
62
63 <para>To see if hardware acceleration is available for your driver, look in
64 <filename>/var/log/Xorg.0.log</filename> for statements like:</para>
65
66<screen><literal> (II) intel(0): direct rendering: DRI2 Enabled</literal></screen>
67
68 <para>If your driver is supported, add any users that might use X to that group:</para>
69
70<screen role="root"><userinput>usermod -a -G video <replaceable>&lt;username&gt;</replaceable></userinput></screen>
71
72 <para>If you elected to install the Mesa-Demos package when installing
73 <xref linkend="mesalib"/>, from an <command>xterm</command>, run
74 <command>glxinfo</command> and first look for the phrase:</para>
75
76<screen><computeroutput>direct rendering: Yes</computeroutput></screen>
77
78 <para>If direct rendering is enabled, you can add verbosity by
79 running <command>LIBGL_DEBUG=verbose glxinfo</command>. This will
80 show the drivers, device nodes and files used by the DRI system.</para>
81
82 <para>If DRI is enabled, to confirm that DRI2 hardware acceleration is
83 working you can (still in the <command>xterm</command>) run the command
84 <command>glxinfo | grep "OpenGL renderer string"</command> - if that
85 reports something <emphasis>other than</emphasis>
86 <literal>Software Rasterizer</literal> then you have working acceleration
87 for the user who ran the command.</para>
88
89 <para>Again, if you have added the Mesa-Demos package, you can also
90 run the test program <command>glxgears</command>.
91 This program brings up a window with three gears turning. The
92 <command>xterm</command> will display how many frames were drawn every
93 five seconds, so this is a reasonable benchmark. The window is scalable,
94 and the frames drawn per second is highly dependent on the size of
95 the window.</para>
96
97 </sect2>
98
99 <sect2 role="configuration" id='X11R6-compat-symlink'
100 xreflabel="Creating an X11R6 Compatibility Symlink">
101
102 <title>Creating an X11R6 Compatibility Symlink</title>
103
104 <para>Until recently (relatively speaking) almost every
105 <application>X Window</application> installation you performed or came
106 across was installed in the
107 <filename class='directory'>/usr/X11R6</filename> directory. That was the
108 standard for years. Developers picked up on this and wrote their package
109 installation scripts looking for <application>X</application> in the
110 standard location. Things have changed and the trend is to now install
111 <application>X</application> in
112 <filename class='directory'>/usr</filename>. Some people want to install
113 it in a custom location.</para>
114
115 <para>Many package developers have not caught up to the change and their
116 packages are still trying to find <application>X</application> in
117 <filename class='directory'>/usr/X11R6</filename> and subsequently fail
118 when you try to build the package. Though for most packages it is not
119 difficult to 'hack' the installation script to fix the problem, that is not
120 the long term solution to the problem. Upstream developers need to modernize
121 their installation scripts and eliminate the problem altogether.</para>
122
123 <para>Until then, you can create a symbolic link to satisfy the
124 <filename class='directory'>/usr/X11R6</filename> requirement so that you
125 won't be inconvenienced with a package build failure due to this known
126 issue. If you wish to create the symlink, issue the following command as
127 the <systemitem class="username">root</systemitem>:</para>
128
129<screen role="root"><userinput>ln -vsf $XORG_PREFIX /usr/X11R6</userinput></screen>
130
131 </sect2>
132
133 <sect2 role="configuration" id="xft-font-protocol" xreflabel="Xft Font Protocol">
134 <title>Xft Font Protocol</title>
135
136 <!-- there is no #label in the html to which this index can link -->
137 <!-- renamed to -zztruetype instead of -truetype so that it sorts last. -->
138 <indexterm role="configuration" id=" fonts">
139 <primary sortas="g-zztruetype">TrueType Fonts</primary>
140 </indexterm>
141
142 <para>Xft provides antialiased font rendering through
143 <application>Freetype</application>, and fonts are controlled from the
144 client side using <application>Fontconfig</application>. The default
145 search path is <filename class="directory">/usr/share/fonts</filename>
146 and <filename class="directory">~/.fonts</filename>.
147 <application>Fontconfig</application> searches directories in its
148 path recursively and maintains a cache of the font characteristics in
149 <filename>fonts.cache-1</filename> files in each directory. If the cache
150 appears to be out of date, it is ignored, and information is (slowly)
151 fetched from the fonts themselves. This cache
152 can be regenerated using the <command>fc-cache</command> command at any
153 time. You can see the list of fonts known by
154 <application>Fontconfig</application> by running the command
155 <command>fc-list</command>.</para>
156
157 <para>If you've installed <application>Xorg</application> in any prefix
158 other than <filename class="directory">/usr</filename>, the
159 <application>X</application> fonts were not installed in a
160 location known to <application>Fontconfig</application>. This prevents
161 <application>Fontconfig</application> from using the poorly rendered
162 Type 1 fonts or the non-scalable bitmapped fonts. Symlinks were created
163 from the <filename class="directory">OTF</filename> and <filename
164 class="directory">TTF</filename> <application>X</application> font
165 directories to <filename
166 class="directory">/usr/share/fonts/X11-{OTF,TTF}</filename>. This allows
167 <application>Fontconfig</application> to use the OpenType and TrueType
168 fonts provided by <application>X</application> (which are scalable and
169 of higher quality).</para>
170
171 <para><application>Fontconfig</application> uses names such as
172 "Monospace 12" to define fonts. Applications generally use generic font
173 names such as "Monospace", "Sans" and "Serif".
174 <application>Fontconfig</application> resolves these names to a font that
175 has all characters that cover the orthography of the language indicated
176 by the locale settings. Knowledge of these font names is included in
177 <filename>/etc/fonts/fonts.conf</filename>. Fonts that are not listed
178 in this file are still usable by <application>Fontconfig</application>,
179 but they will not be accessible by the generic family names.</para>
180
181 <para>Standard scalable fonts that come with <application>X</application>
182 provide very poor Unicode coverage. You may notice in applications that
183 use <application>Xft</application> that some characters appear as a box
184 with four binary digits inside. In this case, a font set with the
185 available glyphs has not been found. Other times, applications that
186 don't use other font families by default and don't accept substitutions
187 from <application>Fontconfig</application> will display blank lines when
188 the default font doesn't cover the orthography of the user's language.
189 This happens, e.g., with <application>Fluxbox</application> in the
190 ru_RU.KOI8-R locale.</para>
191
192 <para>In order to provide greater Unicode coverage, it is recommended
193 that you install these fonts:</para>
194
195 <itemizedlist>
196 <listitem>
197 <para><ulink url="http://dejavu.sourceforge.net/">DejaVu fonts</ulink>
198 - These fonts are replacements for the Bitstream Vera fonts and
199 provide Latin-based scripts with accents and Cyrillic glyphs.</para>
200 </listitem>
201 <listitem>
202 <para><ulink
203 url="http://download.savannah.nongnu.org/releases/freefont/">FreeFont</ulink>
204 - This set of fonts covers nearly every non-CJK character, but is not
205 visually pleasing. <application>Fontconfig</application> will use it
206 as a last resort to substitute generic font family names.</para>
207 </listitem>
208 <listitem>
209 <para><ulink
210 url="http://corefonts.sourceforge.net/">Microsoft Core fonts</ulink>
211 - These fonts provide slightly worse Unicode coverage than FreeFont,
212 but are better hinted. Be sure to read the license before using
213 them. These fonts are listed in the aliases in the
214 <filename class="directory">/etc/fonts/fonts.d</filename> directory
215 by default.</para>
216 </listitem>
217 <listitem>
218 <para><ulink
219 url="http://cle.linux.org.tw/fonts/FireFly">Firefly New Sung font</ulink>
220 - This font provides Chinese coverage. This font is listed in the
221 aliases in the
222 the <filename class="directory">/etc/fonts/fonts.d</filename>
223 directory by default.</para>
224 </listitem>
225 <listitem>
226 <para><ulink
227 url="http://cle.linux.org.tw/fonts/Arphic">Arphic fonts</ulink> -
228 A similar set of Chinese fonts to the Firefly New Sung font.
229 These fonts are listed in the aliases in the
230 <filename class="directory">/etc/fonts/fonts.d</filename> directory
231 by default.</para>
232 </listitem>
233 <listitem>
234 <para><ulink
235 url="http://sourceforge.jp/projects/efont/">Kochi fonts</ulink> -
236 These provide Japanese characters, and are listed in the aliases
237 in the <filename class="directory">/etc/fonts/fonts.d</filename>
238 directory by default.</para>
239 </listitem>
240 <listitem>
241 <para><ulink
242 url="http://kldp.net/projects/baekmuk/">Baekmuk fonts</ulink>
243 - These fonts provide Korean coverage, and are listed in the
244 aliases in the
245 <filename class="directory">/etc/fonts/fonts.d</filename> directory
246 by default.</para>
247 </listitem>
248 <listitem>
249 <para><ulink
250 url="&gnome-download-http;/cantarell-fonts/0.0/">Cantarell fonts</ulink>
251 - The Cantarell typeface family provides a contemporary Humanist sans
252 serif. It is particularly optimised for legibility at small sizes and is
253 the preferred font family for the <application>GNOME-3</application> user
254 interface.</para>
255 </listitem>
256 </itemizedlist>
257
258 <para>The list above will not provide complete Unicode coverage. For
259 more information, please visit the <ulink
260 url="http://unifont.org/fontguide/">Unicode Font Guide</ulink>.</para>
261
262 <para>As an example, consider the installation of the DejaVu fonts. From
263 the unpacked source directory, run the following commands as the
264 <systemitem class="username">root</systemitem> user:</para>
265
266<screen role="root"><userinput>install -v -d -m755 /usr/share/fonts/dejavu &amp;&amp;
267install -v -m644 *.ttf /usr/share/fonts/dejavu &amp;&amp;
268fc-cache -v /usr/share/fonts/dejavu</userinput></screen>
269
270 </sect2>
271
272 <sect2 role="configuration" id='xconfig'>
273 <title>Setting up Xorg Devices</title>
274 <para>For most hardware configurations, modern Xorg will automatically
275 get the server configuration correct without any user intervention. There
276 are, however, some cases where auto-configuration will be incorrect.
277 Following are some example manual configuration items that may be of use in
278 these instances.</para>
279
280 <sect3 id="xinput">
281 <title>Setting up X Input Devices</title>
282 <para>For most input devices, no additional configuration will be
283 necessary. This section is provided for informational purposes only.</para>
284
285 <para>A sample default XKB setup could look like the following (executed as
286 the <systemitem class="username">root</systemitem> user):</para>
287<screen><userinput role="username">cat &gt; /etc/X11/xorg.conf.d/xkb-defaults.conf &lt;&lt; "EOF"
288Section "InputClass"
289 Identifier "XKB Defaults"
290 MatchIsKeyboard "yes"
291 Option "XkbOptions" "terminate:ctrl_alt_bksp"
292EOF</userinput></screen>
293
294 </sect3>
295
296 <sect3 id="xdisplay">
297 <title>Fine Tuning Display Settings</title>
298 <para>Again, with modern Xorg, little or no additional configuration is
299 necessary. If you should need extra options passed to your video driver,
300 for instance, you could use something like the following (again, executed as
301 the <systemitem class="username">root</systemitem> user):</para>
302
303<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/videocard-0.conf &lt;&lt; "EOF"
304Section "Device"
305 Identifier "Videocard0"
306 Driver "radeon"
307 VendorName "Videocard vendor"
308 BoardName "ATI Radeon 7500"
309 Option "NoAccel" "true"
310EndSection
311EOF</userinput></screen>
312
313 <para>Another common setup is having multiple server layouts for use in
314 different environments. Though the server will automatically detect the
315 presence of another monitor, it may get the order incorrect:</para>
316
317<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/server-layout.conf &lt;&lt; "EOF"
318Section "ServerLayout"
319 Identifier "DefaultLayout"
320 Screen 0 "Screen0" 0 0
321 Screen 1 "Screen1" LeftOf "Screen0"
322 Option "Xinerama"
323EndSection
324EOF</userinput></screen>
325
326 </sect3>
327 </sect2>
328</sect1>
Note: See TracBrowser for help on using the repository browser.