source: x/installing/x-setup.xml@ 3f72a148

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 3f72a148 was 3f72a148, checked in by DJ Lucas <dj@…>, 18 years ago

Completed X Window section changes/x7 split

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

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