source: x/installing/x-setup.xml@ 6940e5e

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 6940e5e was 6940e5e, checked in by DJ Lucas <dj@…>, 16 years ago

Moved /etc/X11 sysmlinks to x-setup page.

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

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