source: x/installing/x-setup.xml@ 6732c094

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 6732c094 was 6732c094, checked in by Randy McMurchy <randy@…>, 17 years ago

Updated all the XML files (and the one stylesheet) to use the 4.5 version of DocBook XML DTD

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

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