source: archive/x-setup.xml@ 45ab6c7

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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