source: x/installing/x-setup.xml@ c23b62b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 c23b62b was 04c940c3, checked in by Randy McMurchy <randy@…>, 18 years ago

Fixed some typos in various Xorg instructions

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

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