source: x/installing/x-setup.xml@ 42c6288

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 42c6288 was 43b1987f, checked in by Randy McMurchy <randy@…>, 16 years ago

Standardized the linkend= values to double-qoutes to make searching for package references easier

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

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