source: archive/x-setup.xml@ e3167158

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 e3167158 was e3167158, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Cleanup VI. X + Window Managers

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

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