source: x/installing/x-setup.xml@ 129e3680

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 129e3680 was 129e3680, checked in by DJ Lucas <dj@…>, 15 years ago

Added instructions to exclude evdev on x testing.

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

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