source: x/installing/x-setup.xml@ 9f12e36

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 9f12e36 was 9f12e36, checked in by Randy McMurchy <randy@…>, 18 years ago

Removed 'keywordset' blocks and extra spaces from the XML files (note this was by accident as I meant to do just in the gnome directory but I was in the root of BOOK when I ran the script, but this was going to happen anyway so I don't think it is a big deal)

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

  • Property mode set to 100644
File size: 28.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="x-setup" xreflabel="X Window System Components">
9 <?dbhtml filename="x-setup.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>X Window System Components</title>
17
18 <sect2 role="configuration" id='xconfig'>
19 <title>Configuring The X Window System</title>
20
21 <para condition="html" role="usernotes">User Notes:
22 <ulink url='&blfs-wiki;/XWindowSystemComponents'/></para>
23
24 <para>If you've installed the X Window System in any prefix other
25 than <filename>/usr</filename>, as the
26 <systemitem class="username">root</systemitem> user, add
27 <filename class="directory">
28 <replaceable>&lt;/usr/X11R6&gt;</replaceable>/lib</filename> to
29 the <filename>/etc/ld.so.conf</filename> file and run
30 <command>ldconfig</command>. Additionally, while still the
31 <systemitem class="username">root</systemitem> user, ensure
32 <filename class="directory">
33 <replaceable>&lt;/usr/X11R6&gt;</replaceable>/bin</filename>
34 and <filename class="directory">
35 <replaceable>&lt;/usr/X11R6&gt;</replaceable>/lib/pkgconfig</filename>
36 are added to your <envar>PATH</envar> and <envar>PKG_CONFIG_PATH</envar>
37 environment variables, respectively. Instructions for doing this are
38 described in the section <xref linkend='postlfs-config-profile'/>.</para>
39
40 <para>As the <systemitem class="username">root</systemitem> user
41 create a basic X Window System configuration file with the following
42 commands:</para>
43
44 <para>For <application>Xorg</application>:</para>
45<screen><userinput>cd ~ &amp;&amp;
46Xorg -configure</userinput></screen>
47
48 <para>For <application>XFree86</application>:</para>
49<screen><userinput>cd ~ &amp;&amp;
50XFree86 -configure</userinput></screen>
51
52 <indexterm zone="x-setup xconfig">
53 <primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
54 </indexterm>
55
56 <indexterm zone="x-setup xconfig">
57 <primary sortas="e-etc-X11-XF86Config">/etc/X11/XF86Config</primary>
58 </indexterm>
59
60 <para>The screen will go black and you may hear some clicking of the
61 monitor. This command will create a file in your
62 home directory, <filename>xorg.conf.new</filename> for
63 <application>Xorg</application>, or <filename>XF86Config.new</filename>
64 for <application>XFree86</application>.</para>
65
66 <para>Edit the newly created configuration file to suit your system. The
67 details of the files are located in the <filename>xorg.conf.5x</filename>
68 and <filename>XF86Config.5x</filename> man
69 pages. Some things you may want to do are:</para>
70
71 <itemizedlist>
72 <listitem>
73 <para>Section "Files". Change the order of the font paths searched.
74 You may want to put 100dpi fonts ahead of 75dpi fonts if your system
75 normally comes up closer to 100 dots per inch. You may want to remove
76 some font directories completely.</para>
77 </listitem>
78 <listitem>
79 <para>Section "Module". If you are going to install NVIDIA
80 drivers, remove the "dri" line.</para>
81 </listitem>
82 <listitem>
83 <para>Sections "InputDevice". You may want to change the
84 keyboard autorepeat rate by adding
85 <option>Option "Autorepeat" "250 30"</option>.</para>
86 </listitem>
87 <listitem>
88 <para>Section "Monitor". Specify the <option>VertRefresh</option>
89 and <option>HorizSync</option> values if the system does not
90 automatically detect the monitor and its values.</para>
91 </listitem>
92 <listitem>
93 <para>Section "Device". You may want to set some of the options
94 available for your selected video driver. A description of the driver
95 parameters is in the man page for your driver.</para>
96 </listitem>
97 <listitem><para>Section "Screen". Add a DefaultDepth statement such as:
98 <option>DefaultDepth 24</option>. In the SubSection for your
99 default depth, add a modes line such as:
100 <option>Modes "1600x1200" "1280x1024" "1024x768"</option>. The first
101 mode listed will normally be the starting resolution.</para>
102 </listitem>
103 </itemizedlist>
104
105 <para>Test the system with one of the following commands:</para>
106
107 <para>For <application>Xorg</application>:</para>
108<screen><userinput>X -config ~/xorg.conf.new</userinput></screen>
109
110 <para>For <application>XFree86</application>:</para>
111<screen><userinput>XFree86 -xf86config ~/XF86Config.new</userinput></screen>
112
113 <para>You will only get a gray background with an X-shaped mouse cursor,
114 but it confirms the system is working. Exit with
115 <keycap>Control+Alt+Backspace</keycap>. If the system does not work, take
116 a look at <filename>/var/log/Xorg.0.log</filename> or
117 <filename>/var/log/XFree86.0.log</filename> to see what went
118 wrong.</para>
119
120 <para>As the <systemitem class="username">root</systemitem> user, create
121 the configuration directory and move the configuration file to the new
122 directory:</para>
123
124 <para>For <application>Xorg</application>:</para>
125<screen role="root"><userinput>install -v -m755 -D ~/xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
126
127 <para>For <application>XFree86</application>:</para>
128<screen role="root"><userinput>install -v -m755 -D ~/XF86Config.new /etc/X11/XF86Config</userinput></screen>
129
130 <para>As a convenience, Xorg-&xorg7-version; users should populate the
131 <filename class="directory">/etc/X11</filename> directory with symlinks
132 to various configuration directories that were located in
133 <filename class="directory">/etc/X11</filename> with previous
134 versions of <application>Xorg</application>. This step is not needed
135 for users of Xorg-&xorg-version; or XFree86. Execute the following
136 commands as the <systemitem class="username">root</systemitem>
137 user:</para>
138
139<screen><userinput role="root">mkdir $XORG_PREFIX/lib/X11/twm &amp;&amp;
140ln -svt /etc/X11 \
141 $XORG_PREFIX/lib/X11/{app-defaults,twm,xkb,fs,lbxproxy,proxymngr} \
142 $XORG_PREFIX/lib/X11/{rstart,xdm,xinit,xserver,xsm}</userinput></screen>
143
144 <para>As the <systemitem class="username">root</systemitem> user, create
145 <filename>.xinitrc</filename>:</para>
146
147<screen><userinput>cat &gt; ~/.xinitrc &lt;&lt; "EOF"
148<literal># Begin .xinitrc file
149xterm -g 80x40+0+0 &amp;
150xclock -g 100x100-0+0 &amp;
151twm</literal>
152EOF</userinput></screen>
153
154 <para>This provides an initial screen with a small clock that is
155 managed by a simple window manager, Tab Window Manager. For details of
156 <command>twm</command>, see the man page.</para>
157
158 <indexterm zone="x-setup xconfig">
159 <primary sortas="e-AA.xinitrc">~/.xinitrc</primary>
160 </indexterm>
161
162 <note>
163 <para>Both the default, and the BLFS configuration for
164 <application>Xorg</application> include <application>xterm</application>.
165 <application>Xorg</application>'s modular distribution no longer includes
166 <application>xterm</application>, and
167 as a result, the <command>startx</command> command will fail if you have
168 not installed <xref linkend="xterm2"/> when using the modular X Window
169 System. You can remove the <application>xterm</application> line in the
170 above config file to test the xserver, or install one of the other
171 terminal emulators and make appropriate changes.</para>
172 </note>
173
174 <para>When needed, the X Window System creates the directory
175 <filename class='directory'>/tmp/.ICE-unix</filename> if it does not
176 exist. If this directory is not owned by
177 <systemitem class="username">root</systemitem>,
178 the X Window System delays startup by a few seconds and also
179 appends a warning to the logfile. This also affects startup of other
180 applications. To improve performance, it is advisable to manually create
181 the directory before the X Window System uses it. Add the file creation
182 to <filename>/etc/sysconfig/createfiles</filename> that is sourced by
183 the <filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
184
185<screen role="root"><userinput>cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"
186/tmp/.ICE-unix dir 1777 root root
187EOF</userinput></screen>
188
189 <indexterm zone="x-setup xconfig">
190 <primary
191 sortas="e-etc-sysconfig-createfiles">/etc/sysconfig/createfiles</primary>
192 </indexterm>
193
194 <para>Start <application>X</application> with:</para>
195
196<screen><userinput>startx</userinput></screen>
197
198 <para>and a basic functional <application>X Window
199 System</application> should be displayed.</para>
200
201 <para>For a list of the package contents and a description of the commands,
202 see the sections in the <xref linkend='xfree86-contents'/>.</para>
203
204 </sect2>
205
206 <sect2 id='dri'>
207 <title>Checking Direct Rendering Infrastructure (DRI) Installation</title>
208
209 <indexterm zone="x-setup dri">
210 <primary sortas="g-DRI">DRI</primary>
211 </indexterm>
212
213 <para>DRI is a framework for allowing software to access graphics hardware
214 in a safe and efficient manner. It is installed in
215 <application>X</application> by default if you have a supported video card.
216 To enable direct rendering using the OpenGL implementation from
217 <xref linkend="mesalib"/> (built separately with <xref linkend="xorg7"/>
218 or included with <xref linkend="xorg"/> and <xref linkend="xfree86"/>),
219 the "glx" and "dri" modules must be loaded. Additionally, the created
220 device nodes in <filename class="directory">/dev/dri</filename> must
221 have proper permissions for your users. A sample
222 <filename>XF86config</filename> or <filename>xorg.conf</filename>
223 file might look like this:</para>
224
225<screen><literal>Section "Module"
226 ...
227 Load "glx"
228 Load "dri"
229 ...
230EndSection
231...
232Section "DRI"
233 Group "video"
234 Mode 0660
235EndSection</literal></screen>
236
237 <note><para>DRI configuration may differ if you are using alternate
238 drivers, such as those from
239 <ulink url="http://www.nvidia.com/page/home.html">NVIDIA</ulink> or
240 <ulink url="http://www.ati.com/">ATI</ulink>.</para>
241 </note>
242
243 <para>To check if DRI is installed properly, check the log file
244 <filename>/var/log/XFree86.0.log</filename> or
245 <filename>/var/log/Xorg.0.log</filename> for statements like:</para>
246
247<screen><literal>(II) R128(0): Direct rendering enabled</literal></screen>
248
249 <para>From an <command>xterm</command>, run <command>glxinfo</command>
250 and look for the phrase:</para>
251
252<screen><computeroutput>direct rendering: Yes</computeroutput></screen>
253
254 <para>If direct rendering is not enabled, you can add verbosity by
255 running <command>LIBGL_DEBUG=verbose glxinfo</command>. This will
256 show the drivers, device nodes and files used by the DRI system.</para>
257
258 <para>You can also run the test program <command>glxgears</command>.
259 This program brings up a window with three gears turning. The
260 <command>xterm</command> will display how many frames were drawn every
261 five seconds, so this is a reasonable benchmark. The window is scalable,
262 and the frames drawn per second is highly dependent on the size of
263 the window.</para>
264
265 <indexterm zone="x-setup dri">
266 <primary sortas="b-glxgears">glxgears</primary>
267 </indexterm>
268
269 <indexterm zone="x-setup dri">
270 <primary sortas="b-glxinfo">glxinfo</primary>
271 </indexterm>
272
273 <para>For troubleshooting problems, check the DRI Users Guide at
274 <ulink url="http://dri.sourceforge.net/doc/DRIuserguide.html"/>.</para>
275
276 </sect2>
277
278<!-- ================================================== -->
279
280 <sect2 id='fonts'>
281 <title>Setting up Fonts</title>
282
283 <para>There are two font systems in the
284 <application>X Window System</application>. The first is the
285 core X font protocol, and the second is Xft. Toolkits that use the core
286 X font protocol include Xt, Xaw, Motif clones and GTK+-1.2. Toolkits that
287 use Xft include GTK+-2 and Qt and use <application>Fontconfig</application>
288 for control. Both font systems should be configured for proper font
289 coverage in the <application>X Window System</application>.</para>
290
291 <indexterm zone="x-setup fonts">
292 <primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
293 </indexterm>
294
295 <indexterm zone="x-setup fonts">
296 <primary sortas="e-etc-X11-XF86Config">/etc/X11/XF86Config</primary>
297 </indexterm>
298
299 <sect3>
300 <title>Core X Font Protocol</title>
301
302 <indexterm zone="x-setup fonts">
303 <primary sortas="g-core-x-font">Core X Font Protocol</primary>
304 </indexterm>
305
306 <para>The core X font protocol finds fonts from the server configuration
307 file (<filename>xorg.conf</filename> or <filename>XF86Config</filename>).
308 If no font paths exist in the configuration file, the server will fall
309 back to an internal hard-coded path. Assuming the prefix for your
310 <application>X</application> installation is
311 <filename class="directory">/usr/X11R6</filename>, the core fonts will
312 reside in subdirectories of <filename
313 class="directory">/usr/X11R6/lib/X11/fonts</filename>. For each
314 directory in the path, the server reads three files:</para>
315
316 <itemizedlist>
317 <listitem>
318 <para><filename>fonts.dir</filename> - maps font files to font
319 names&semi; updated with <command>mkfontdir</command></para>
320 </listitem>
321 <listitem>
322 <para><filename>fonts.alias</filename> - defines aliases (such as
323 "9x18") for existing fonts</para>
324 </listitem>
325 <listitem>
326 <para><filename>fonts.scale</filename> - lists scalable fonts&semi;
327 updated with <command>mkfontscale</command></para>
328 </listitem>
329 </itemizedlist>
330
331 <para>The core X fonts protocol uses names such as
332 <systemitem>-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1</systemitem>.
333 These fonts are rendered by the <application>X</application> server
334 without antialiasing. The server itself uses the "cursor" font for
335 painting the mouse cursor, and the protocol specification requires the
336 font "fixed" to be available.</para>
337
338 <para>Scalable fonts, such as Type1 and TrueType, are read from
339 <filename>fonts.scale</filename> files by the server. The core X font
340 system uses the "freetype" module for non-antialiased rendering of these
341 fonts. Ensure that the "freetype" module is loaded in the
342 <filename>XF86config</filename> or <filename>xorg.conf</filename>
343 file by adding it to the "Module" section:</para>
344
345<screen><literal>Section "Module"
346 ...
347 Load "freetype"
348 ...
349EndSection</literal></screen>
350
351 <para>The character set used is part of the font name, e.g. "-iso8859-1".
352 It is important that applications which support a non-English interface
353 specify the character set correctly so that the proper glyphs are used.
354 This can be controlled through the <application>X</application>
355 resources, which will be described later.</para>
356
357 <para>In some cases, applications rely upon the fonts named "fixed" or
358 something like "9x18". In these cases, it is important that the
359 <filename>fonts.alias</filename> file specifies the correct character
360 set. Users of ISO-8859-<replaceable>X</replaceable> encodings where
361 <replaceable>X</replaceable> != 1 should modify the
362 <filename>/usr/lib/X11/fonts/misc/fonts.alias</filename> file by
363 replacing the "iso8859-1" string with the proper encoding name. This is
364 accomplished by running the following command as the <systemitem
365 class="username">root</systemitem> user, substituting the proper value
366 for <replaceable>&lt;X&gt;</replaceable>:</para>
367
368<screen role="root"><userinput>sed -i 's,iso8859-1\( \|$\),iso8859-<replaceable>&lt;X&gt;</replaceable>\1,g' \
369 /usr/lib/X11/fonts/{75dpi,100dpi,misc}/fonts.alias</userinput></screen>
370
371 <para>Users of Cyrillic fonts have properly defined aliases in
372 <filename>/usr/lib/X11/fonts/cyrillic/fonts.alias</filename>. However,
373 this file will not be used unless the <filename
374 class="directory">/usr/lib/X11/fonts/cyrillic</filename> directory is
375 first in the font search path. Otherwise, the
376 <filename>/usr/lib/X11/fonts/misc/fonts.alias</filename> file will be
377 used.</para>
378
379 </sect3>
380
381 <sect3 id="xft-font-protocol" xreflabel="Xft Font Protocol">
382 <title>Xft Font Protocol</title>
383
384 <indexterm zone="x-setup fonts">
385 <primary sortas="g-truetype">TrueType Fonts</primary>
386 </indexterm>
387
388 <para>Xft provides antialiased font rendering through
389 <application>Freetype</application>, and fonts are controlled from the
390 client side using <application>Fontconfig</application>. The default
391 search path is <filename class="directory">/usr/share/fonts</filename>
392 and <filename class="directory">~/.fonts</filename>.
393 <application>Fontconfig</application> searches directories in its
394 path recursively and maintains a cache of the font characteristics in
395 <filename>fonts.cache-1</filename> files in each directory. If the cache
396 appears to be out of date, it is ignored, and information is (slowly)
397 fetched from the fonts themselves. This cache
398 can be regenerated using the <command>fc-cache</command> command at any
399 time. You can see the list of fonts known by
400 <application>Fontconfig</application> by running the command
401 <command>fc-list</command>.</para>
402
403 <para>The <application>X</application> fonts were not installed in a
404 location known to <application>Fontconfig</application>. This prevents
405 <application>Fontconfig</application> from using the poorly rendered
406 Type 1 fonts or the non-scalable bitmapped fonts. Symlinks were created
407 from the <filename class="directory">OTF</filename> and <filename
408 class="directory">TTF</filename> <application>X</application> font
409 directories to <filename
410 class="directory">/usr/share/fonts/X11-{OTF,TTF}</filename>. This allows
411 <application>Fontconfig</application> to use the OpenType and TrueType
412 fonts provided by <application>X</application> (which are scalable and
413 of higher quality).</para>
414
415 <para><application>Fontconfig</application> uses names such as
416 "Monospace 12" to define fonts. Applications generally use generic font
417 names such as "Monospace", "Sans" and "Serif".
418 <application>Fontconfig</application> resolves these names to a font that
419 has all characters that cover the orthography of the language indicated
420 by the locale settings. Knowledge of these font names is included in
421 <filename>/etc/fonts/fonts.conf</filename>. Fonts that are not listed
422 in this file are still usable by <application>Fontconfig</application>,
423 but they will not be accessible by the generic family names.</para>
424
425 <para>Standard scalable fonts that come with <application>X</application>
426 provide very poor Unicode coverage. You may notice in applications that
427 use <application>Xft</application> that some characters appear as a box
428 with four binary digits inside. In this case, a font set with the
429 available glyphs has not been found. Other times, applications that
430 don't use other font families by default and don't accept substitutions
431 from <application>Fontconfig</application> will display blank lines when
432 the default font doesn't cover the orthography of the user's language.
433 This happens, e.g., with <application>Fluxbox</application> in the
434 ru_RU.KOI8-R locale.</para>
435
436 <para>In order to provide greater Unicode coverage, it is recommended
437 that you install these fonts:</para>
438
439 <itemizedlist>
440 <listitem>
441 <para><ulink url="http://dejavu.sourceforge.net/">DejaVu fonts</ulink>
442 - These fonts are replacements for the Bitstream Vera fonts and
443 provide Latin-based scripts with accents and Cyrillic glyphs.
444 The DejaVu fonts by are not aliased to the generic family names
445 by default, so <filename>/etc/fonts/fonts.conf</filename> will
446 have to be edited for it to be recognized by the generic names such
447 as "Sans". This will be described below.</para>
448 </listitem>
449 <listitem>
450 <para><ulink
451 url="http://download.savannah.nongnu.org/releases/freefont/">FreeFont</ulink>
452 - This set of fonts covers nearly every non-CJK character, but is not
453 visually pleasing. <application>Fontconfig</application> will use it
454 as a last resort to substitute generic font family names.</para>
455 </listitem>
456 <listitem>
457 <para><ulink
458 url="http://corefonts.sourceforge.net/">Microsoft Core fonts</ulink>
459 - These fonts provide slightly worse Unicode coverage than FreeFont,
460 but are better hinted. Be sure to read the license before using
461 them. These fonts are listed in the
462 <filename>/etc/fonts/fonts.conf</filename> aliases by default.</para>
463 </listitem>
464 <listitem>
465 <para><ulink
466 url="http://cle.linux.org.tw/fonts/FireFly">Firefly New Sung font</ulink>
467 - This font provides Chinese coverage. This font is not listed in
468 the <filename>/etc/fonts/fonts.conf</filename> aliases by default.
469 </para>
470 </listitem>
471 <listitem>
472 <para><ulink
473 url="http://cle.linux.org.tw/fonts/Arphic">Arphic fonts</ulink> -
474 A similar set of Chinese fonts to the Firefly New Sung font.
475 These fonts are listed in the
476 <filename>/etc/fonts/fonts.conf</filename> aliases by default.
477 </para>
478 </listitem>
479 <listitem>
480 <para><ulink
481 url="http://sourceforge.jp/projects/efont/">Kochi fonts</ulink> -
482 These provide Japanese characters, and they are listed in the aliases
483 in <filename>/etc/fonts/fonts.conf</filename> by default.</para>
484 </listitem>
485 <listitem>
486 <para><ulink
487 url="http://kldp.net/projects/baekmuk/">Baekmuk fonts</ulink>
488 - These fonts provide Korean coverage, and they are listed in the
489 aliases in <filename>/etc/fonts/fonts.conf</filename> by default.
490 </para>
491 </listitem>
492 </itemizedlist>
493
494 <para>The list above will not provide complete Unicode coverage. For
495 more information, please visit the <ulink
496 url="http://unifont.org/fontguide/">Unicode Font Guide</ulink>.</para>
497
498 <para>As an example, consider the installation of the DejaVu fonts. From
499 the unpacked source directory, run the following commands as the
500 <systemitem class="username">root</systemitem> user:</para>
501
502<screen role="root"><userinput>install -v -d -m755 /usr/share/fonts/dejavu &amp;&amp;
503install -v -m644 *.ttf /usr/share/fonts/dejavu &amp;&amp;
504fc-cache -v /usr/share/fonts/dejavu</userinput></screen>
505
506 <para>Earlier it was mentioned that <filename>/etc/fonts/fonts.conf</filename>
507 could be modified to use DejaVu using the default family names. Since
508 DejaVu is a replacement for Bitstream Vera fonts, it can be substituted
509 for that family. Visually inspect the <filename>fonts.conf</filename> to
510 see how fonts are grouped together under the generic family names within
511 &lt;alias&gt; tags and a preference list is created within &lt;prefer&gt;
512 tags. To replace Bitstream Vera with DejaVu, run the following command as
513 the <systemitem class="username">root</systemitem> user:</para>
514
515<screen role="root"><userinput>sed -i 's/&lt;family&gt;Bitstream Vera/&lt;family&gt;DejaVu/' /etc/fonts/fonts.conf</userinput></screen>
516
517<!--
518<screen><userinput><command>sed -i -e '/^&lt;\/fontconfig&gt;/i\
519&lt;dir&gt;/usr/X11R6/lib/X11/fonts/TTF&lt;/dir&gt;\
520&lt;dir&gt;/usr/X11R6/lib/X11/fonts/Type1&lt;/dir&gt;' /etc/fonts/local.conf</command></userinput></screen>
521 -->
522
523 <para>To see which fonts will be used as the generic fonts in your locale,
524 run the command <command>fc-match monospace</command>. Substitute "sans" or
525 "serif" to see the fonts that will be used for those aliases.
526 </para>
527
528 </sect3>
529
530 </sect2>
531
532<!-- ================================================== -->
533
534 <sect2>
535 <title>Setting up Keyboards</title>
536
537 <para>In this version of <application>X</application>, non-Latin
538 keyboard layouts do not include Latin configurations as was previous
539 practice. To set up a keyboard for Latin and non-Latin input, change
540 the XkbLayout keyboard driver option in the InputDevice section
541 of the <filename>XF86Config</filename> or <filename>xorg.conf</filename>
542 file. For example:</para>
543
544<screen><literal>Section "InputDevice"
545 Identifier "Keyboard0"
546 Driver "Keyboard"
547 Option "XkbModel" "pc105"
548 Option "XkbLayout" "en_US,ru"
549 Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
550EndSection</literal></screen>
551
552 <para>In this example, you can use the <keycap>Alt+Shift</keycap>
553 combination to switch between keyboard layouts and use the Scroll Lock
554 LED to indicate when the second layout is active.</para>
555
556 </sect2>
557
558<!-- ================================================== -->
559
560 <sect2 id='xdm'>
561 <title>Setting up XDM</title>
562
563 <para><command>xdm</command> provides a graphical logon capability and
564 is normally set up in <filename>/etc/inittab</filename>. Most of the
565 information you need to customize <command>xdm</command> is found in
566 its man page. To execute <command>xdm</command> during bootup, change
567 the initdefault level to 5 and add the following lines to
568 <filename>/etc/inittab</filename>:</para>
569
570 <indexterm zone="x-setup xdm">
571 <primary sortas="b-xdm">xdm</primary>
572 </indexterm>
573
574<screen><literal># Run xdm as a separate service
575x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</literal></screen>
576
577 <para>If <application>Linux-PAM</application> is installed on your
578 system, you should create a PAM entry for <command>xdm</command> by
579 duplicating the <command>login</command> entry using the following
580 command:</para>
581
582 <indexterm zone="x-setup xdm">
583 <primary sortas="e-etc-pam.d/xdm">/etc/pam.d/xdm</primary>
584 </indexterm>
585
586<screen role="root"><userinput>cp -v /etc/pam.d/login /etc/pam.d/xdm</userinput></screen>
587
588 </sect2>
589
590<!-- ================================================== -->
591
592 <sect2 id='x-resources'>
593 <title>Using X Resources</title>
594
595 <para>There are many options that can be set in
596 <application>X</application> and <application>X</application>
597 clients via resources. Typically resources are set in the
598 <filename>~/.Xresources</filename> file.</para>
599
600 <para>The layout of the <filename>~/.Xresources</filename> file
601 consists of a list of specifications in the form of</para>
602
603 <indexterm zone="x-setup x-resources">
604 <primary sortas="e-AA.xresources">~/.Xresources</primary>
605 </indexterm>
606
607<screen><literal>object.subobject[.subobject...].attribute: value</literal></screen>
608
609 <para>Components of a resource specification are linked together by
610 either <emphasis>tight</emphasis>, represented by a dot (.), or
611 <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
612 A tight binding indicates that the components on either side of the
613 dot must be directly next to each other as defined in a specific
614 implementation. An asterisk is a wildcard character that means that
615 any number of levels in a defined hierarchy can be between the components.
616 For example, X offers two special cursors: redglass and whiteglass. To
617 use one of these resources, you need to add the following line:</para>
618
619<screen><literal>Xcursor.theme: whiteglass</literal></screen>
620
621 <para>However, you can specify the background for all clients with:</para>
622
623<screen><literal>*background: blue</literal></screen>
624
625 <para>More specific resource variables will override less specific
626 names.</para>
627
628 <para>Resource definitions can be found in the man pages for each
629 respective client.</para>
630
631 <para>In order to load your resources, the <command>xrdb</command>
632 program must be called with the appropriate parameters. Typically,
633 the first time resources are loaded, you use:</para>
634
635<screen><userinput>xrdb -load &lt;filename&gt;</userinput></screen>
636
637 <para>To add resources to <application>X</application>'s database
638 in memory, use:</para>
639
640<screen><userinput>xrdb -merge &lt;filename&gt;</userinput></screen>
641
642 <para>The <command>xrdb</command> instruction is usually placed in
643 <filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
644 To get more information, see the <command>xrdb</command> man page.</para>
645
646 <indexterm zone="x-setup x-resources">
647 <primary sortas="b-xrdb">xrdb</primary>
648 </indexterm>
649
650 </sect2>
651
652</sect1>
Note: See TracBrowser for help on using the repository browser.