source: x/installing/x-setup.xml@ 410e228b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 410e228b was 410e228b, checked in by Randy McMurchy <randy@…>, 16 years ago

Removed extraneous whitespace from the ends of line text

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

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