source: x/installing/xfree86-setup.xml@ b77b166f

10.0 10.1 11.0 6.0 6.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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since b77b166f was b77b166f, checked in by Larry Lawrence <larry@…>, 19 years ago

more spellcheck

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

  • Property mode set to 100644
File size: 7.6 KB
Line 
1<sect1 id="x-setup">
2<?dbhtml filename="xfree86-setup.html" dir="x"?>
3<title>Setting up XFree86 Components</title>
4
5<sect2>
6<title>Checking Direct Rendering Infrastructure (DRI) Installation</title>
7<para>DRI is a framework for allowing software to access graphics hardware
8in a safe and efficient manner. It is installed in XFree86 by default if
9you have a supported video card. To check if DRI is installed properly,
10check the log file <filename>/var/log/XFree86.0.log</filename> for statements
11like:</para>
12
13<para><screen>(II) R128(0): Direct rendering enabled</screen></para>
14
15<para>From an xterm, run <userinput>glxinfo</userinput> and look for the phrase:</para>
16<para><screen>direct rendering: Yes</screen></para>
17
18<para>You can also run the test program <userinput>glxgears</userinput>.
19This program brings up a window with three gears turning. The
20<filename>xterm</filename> will display how many frames were drawn every
21five seconds so this is a reasonable benchmark. The window is scalable, and
22the frames drawn per second is highly dependent on the size of
23the window.</para>
24
25<para>For troubleshooting problems, check the DRI Users Guide at
26<userinput><ulink url="http://dri.sourceforge.net/doc/DRIuserguide.html"/></userinput>.
27</para>
28</sect2>
29
30<!-- ================================================== -->
31
32<sect2>
33<title>Adding TrueType fonts to XFree86</title>
34
35<para>TrueType font support is built into XFree86. The following items need to
36be completed to make the fonts available.</para>
37
38<itemizedlist>
39
40<listitem><para>Establish a directory for the fonts and move any
41TrueType fonts you want into that directory.</para></listitem>
42
43<listitem><para>Create the <filename>fonts.scale</filename> and
44<filename>fonts.dir</filename> files in the TrueType font
45directory.</para></listitem>
46
47<listitem><para>Ensure the truetype module is loaded in
48<filename>XF86Config</filename>.</para></listitem>
49
50<listitem><para>Ensure the <parameter>FontPath</parameter> in
51<filename>XF86Config</filename> contains the TrueType font
52directory.</para></listitem>
53
54</itemizedlist>
55
56<sect3><title>Establish a TrueType font directory</title>
57
58<para>The build of XFree86 as given above automatically creates a TrueType
59font directory: <filename>/usr/X11R6/lib/X11/fonts/TTF</filename>. This
60directory already has some TrueType fonts and is set up correctly.
61If this directory is satisfactory, copy any other TrueType fonts you want
62into that directory. If not, create a new directory, preferably in
63the <filename>/usr/X11R6/lib/X11/fonts/</filename> directory and put
64your TrueType fonts there.</para></sect3>
65
66<sect3><title>Create <filename>fonts.scale</filename> and
67<filename>fonts.dir</filename></title>
68
69<para>Now change to the directory where you have your TrueType fonts and run
70<screen><userinput>mkfontscale &amp;&amp;
71mkfontdir</userinput></screen></para></sect3>
72
73<sect3><title>Ensure TrueType is loaded in <filename>XF86Config</filename></title>
74<para>The "Module" section should look like:
75<screen>Section "Module"
76 ...
77 Load "freetype"
78 ...
79EndSection</screen></para></sect3>
80
81<sect3><title>Ensure the <parameter>FontPath</parameter> in
82<filename>XF86Config</filename> points to the TrueType font directory</title>
83<para>The "Files" section should look like
84<screen>Section "Files"
85 ...
86 FontPath "/usr/X11R6/lib/X11/fonts/&lt;TruetypeDir&gt;/"
87 ...
88EndSection</screen></para>
89</sect3>
90
91<sect3><title>Update the font cache files</title>
92<para>Finally, to update all the font
93cache files specified in <filename>/etc/fonts/fonts.conf</filename>, run
94<screen><userinput>fc-cache</userinput></screen>
95</para>
96
97<para>XFree86 will now be able to use TrueType fonts when it is restarted.
98You can check to see if the new fonts are available with the
99<userinput>xlsfonts</userinput> or <userinput>xfontsel</userinput>
100program.</para>
101
102<note><para>You should re-run <userinput>mkfontscale</userinput> and
103<userinput>mkfontdir</userinput> any time you add or delete TrueType fonts.
104You should also rerun <userinput>fc-cache</userinput> each time
105you add or remove any fonts.</para></note>
106
107</sect3>
108</sect2>
109
110<!-- ================================================== -->
111<sect2>
112<title>Setting up keyboards</title>
113<para>In this version of XFree86, it has been reported that non-latin
114keyboard layouts do not include latin configurations as was previous
115practice. To set up a keyboard for latin and non-latin input,
116change the XkbLayout keyboard driver option in the InputDevice section
117of the <filename>XF86Config</filename> file. For example:</para>
118
119<para><screen> Section "InputDevice"
120 Identifier "Keyboard0"
121 Driver "Keyboard"
122 Option "XkbModel" "pc105"
123 Option "XkbLayout" "en_US,ru"
124 Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
125 EndSection</screen></para>
126
127<para>In this example, you can use the Alt-Shift combination to switch
128between keyboard layouts and use the Scroll Lock LED to indicate when
129the second layout is active.</para>
130</sect2>
131
132<!-- ================================================== -->
133<sect2>
134<title>Setting up xdm</title>
135<para><filename>xdm</filename> provides a graphical logon capability and is
136normally set up in <filename>/etc/inittab</filename>. Most of the information
137you need to customize <filename>xdm</filename> is found in its man page. To
138execute xdm during bootup, change the initdefault level to 5 and
139add the following lines to
140<filename>/etc/inittab</filename>:</para>
141
142<para><screen># Run xdm as a separate service
143x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</screen></para>
144</sect2>
145
146<!-- ================================================== -->
147<sect2>
148<title>Using XFree86 Resources</title>
149<para>There are many options that can be set in XFree86 and X clients via
150resources. Typically resources are set in the <filename>~/.Xresources</filename>
151file.</para>
152
153<para>The layout of the <filename>~/.Xresources</filename> file consists
154if a list of specifications in the form of</para>
155
156<para><screen>object.subobject[.subobject...].attribute: value</screen></para>
157
158<para>Typically, components of a resource specification are linked together
159by either <emphasis>tight</emphasis>, represented by a dot (.),
160or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
161A tight binding indicates that the components on either side of the dot must
162be directly next to each other as defined in a specific implementation. An
163asterisk is a wildcard character that means that any number of levels in
164a defined hierarchy can be between the components.
165For example, XFree86 offers two new cursors: redglass and whiteglass. To
166use one of these resources, you need to add the following line:</para>
167
168<para><screen>Xcursor.theme: whiteglass</screen></para>
169
170<para>However, you can specify the background for all clients with:</para>
171
172<para><screen>*background: blue</screen></para>
173
174<para>More specific resource variables will override less specific names. </para>
175
176<para>Resource definitions can be found in the man pages for each
177respective client.</para>
178
179<para>In order to load your resources, the <filename>xrdb</filename>
180program must be
181called with the appropriate parameters. Typically, the first time
182resources are loaded, you use:</para>
183
184<para><screen>xrdb -load &lt;filename&gt;</screen></para>
185
186<para>To add resources to XFree86's database in memory use:</para>
187<para><screen>xrdb -merge &lt;filename&gt;</screen></para>
188
189<para>The <filename>xrdb</filename> instruction is usually placed in
190<filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
191To get more information, see the <filename>xrdb</filename> man page.</para>
192</sect2>
193
194</sect1>
195
Note: See TracBrowser for help on using the repository browser.