source: x/installing/x-setup.xml@ 46b900a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 46b900a was 46b900a, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago

Rewrote rescue bootdisk page

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

  • Property mode set to 100644
File size: 12.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="x-setup">
9<sect1info>
10<othername>$LastChangedBy$</othername>
11<date>$Date$</date>
12</sect1info>
13<?dbhtml filename="xfree86-setup.html"?>
14<title>X Window System Components</title>
15
16<sect2 id='dri'>
17<title>Checking Direct Rendering Infrastructure (<acronym>DRI</acronym>)
18Installation</title>
19
20<indexterm zone="x-setup dri">
21 <primary sortas="g-DRI">DRI</primary>
22</indexterm>
23
24<para><acronym>DRI</acronym> is a framework for allowing software to access
25graphics hardware in a safe and efficient manner. It is installed in
26<application>X</application> by default if you have a supported video card.
27To check if <acronym>DRI</acronym> is installed properly, check the log file
28<filename>/var/log/XFree86.0.log</filename> or
29<filename>/var/log/Xorg.0.log</filename> for statements like:</para>
30
31<screen>(II) R128(0): Direct rendering enabled</screen>
32
33<para>From an <command>xterm</command>, run <command>glxinfo</command> and
34look for the phrase:</para>
35
36<screen>direct rendering: Yes</screen>
37
38<para>You can also run the test program <command>glxgears</command>.
39This program brings up a window with three gears turning. The
40<command>xterm</command> will display how many frames were drawn every
41five seconds, so this is a reasonable benchmark. The window is scalable, and
42the frames drawn per second is highly dependent on the size of
43the window.</para>
44
45<indexterm zone="x-setup dri">
46 <primary sortas="b-glxgears">glxgears</primary>
47</indexterm>
48
49<indexterm zone="x-setup dri">
50 <primary sortas="b-glxinfo">glxinfo</primary>
51</indexterm>
52
53<para>For troubleshooting problems, check the <acronym>DRI</acronym> Users
54Guide at
55<ulink url="http://dri.sourceforge.net/doc/DRIuserguide.html"/>.</para>
56
57</sect2>
58
59<!-- ================================================== -->
60
61<sect2 id='fonts'>
62<title>Adding <application>TrueType</application> fonts to
63<application>X</application></title>
64
65<para><application>TrueType</application> font support is built into
66<application>X</application>. The following items need to
67be completed to make the fonts available.</para>
68
69<indexterm zone="x-setup fonts">
70 <primary sortas="g-truetype">TrueType</primary>
71</indexterm>
72
73<itemizedlist>
74<listitem><para>Establish a directory for the fonts and move any
75<application>TrueType</application> fonts you want into that directory.
76Ensure that any fonts you install are world readable. Incorrect
77permissions on fonts have been known to cause problems with some X
78applications.</para></listitem>
79
80<listitem><para>Download the fonts.</para></listitem>
81
82<listitem><para>Create the <filename>fonts.scale</filename> and
83<filename>fonts.dir</filename> files in the
84<application>TrueType</application> font
85directory.</para></listitem>
86
87<listitem><para>Ensure the <application>TrueType</application> module is
88loaded in the <filename>XF86Config</filename> or
89<filename>xorg.conf</filename>.</para></listitem>
90
91<listitem><para>Ensure the <parameter>FontPath</parameter> in
92<filename>XF86Config</filename> or <filename>xorg.conf</filename> contains the
93<application>TrueType</application> font directory.</para></listitem>
94
95<listitem><para>Update the font cache files</para></listitem>
96</itemizedlist>
97
98<indexterm zone="x-setup fonts">
99 <primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
100</indexterm>
101
102<indexterm zone="x-setup fonts">
103 <primary sortas="e-etc-Xll-XF86Config">/etc/X11/XF86Config</primary>
104</indexterm>
105
106<sect3><title>Establish a <application>TrueType</application> font
107directory</title>
108
109<para>The build of <application>X</application> as given above automatically
110creates a <application>TrueType</application> font directory:
111<filename class="directory">/usr/X11R6/lib/X11/fonts/TTF</filename>. This
112directory already has some <application>TrueType</application> fonts and is
113set up correctly. If this directory is satisfactory, copy any other
114<application>TrueType</application> fonts you want into that directory. If
115not, create a new directory, preferably in the
116<filename class="directory">/usr/X11R6/lib/X11/fonts/</filename> directory and
117put your <application>TrueType</application> fonts there.</para>
118</sect3>
119
120<sect3><title>Download the fonts</title>
121
122<para>There are two known high quality free font resources:
123<ulink url="ftp://ftp.gnu.org/savannah/files/freefont/"/> and
124<ulink url="http://corefonts.sourceforge.net/"/>. Copy the fonts (files with
125the <filename>.ttf</filename> suffix) to the directory you've just
126created.</para>
127
128</sect3>
129
130<sect3><title>Create <filename>fonts.scale</filename> and
131<filename>fonts.dir</filename></title>
132
133<para>Now change to the directory where you have your
134<application>TrueType</application> fonts and run:
135<screen><userinput><command>mkfontscale &amp;&amp;
136mkfontdir</command></userinput></screen></para></sect3>
137
138<sect3><title>Ensure <application>TrueType</application> is loaded in
139<filename>XF86Config</filename> or <filename>xorg.conf</filename></title>
140<para>The "Module" section should look like:
141<screen>Section "Module"
142 ...
143 Load "freetype"
144 ...
145EndSection</screen></para>
146</sect3>
147
148<sect3><title>Ensure the <parameter>FontPath</parameter> in
149<filename>XF86Config</filename> or <filename>xorg.conf</filename> points to the
150<application>TrueType</application> font directory</title>
151<para>The "Files" section should look like:
152<screen>Section "Files"
153 ...
154 FontPath "/usr/X11R6/lib/X11/fonts/<replaceable>[TrueTypeDir]</replaceable>/"
155 ...
156EndSection</screen></para>
157</sect3>
158
159<sect3><title>Update the font cache files</title>
160
161<para>Ensure you have the following directory entries in
162<filename>/etc/fonts/local.conf</filename>, inside the fontconfig
163tags:</para>
164
165<indexterm zone="x-setup fonts">
166 <primary sortas="e-etc-fonts-local.conf">/etc/fonts/local.conf</primary>
167</indexterm>
168
169<screen><userinput><command>sed -i -e '/^&lt;\/fontconfig&gt;/i\
170&lt;dir&gt;/usr/X11R6/lib/X11/fonts/TTF&lt;/dir&gt;\
171&lt;dir&gt;/usr/X11R6/lib/X11/fonts/Type1&lt;/dir&gt;' /etc/fonts/local.conf</command></userinput></screen>
172
173<para>The <command>fc-cache</command> program will automatically search
174the above directories and all subdirectories for needed fonts.</para>
175
176<para>Finally, to update all the font cache files, run</para>
177
178<screen><userinput><command>fc-cache</command></userinput></screen>
179
180<indexterm zone="x-setup fonts">
181 <primary sortas="b-fc-cache">fc-cache</primary>
182</indexterm>
183
184<para><application>X</application> will now be able to use
185<application>TrueType</application> fonts when it is restarted.
186You can check to see if the new fonts are available with the
187<command>xlsfonts</command> or <command>xfontsel</command>
188program.</para>
189
190<note><para>You should rerun <command>mkfontscale</command> and
191<command>mkfontdir</command> any time you add or delete
192<application>TrueType</application> fonts.
193You should also rerun <command>fc-cache</command> each time
194you add or remove any fonts.</para></note>
195
196</sect3>
197</sect2>
198
199<!-- ================================================== -->
200<sect2>
201<title>Setting up keyboards</title>
202<para>In this version of <application>X</application>, non-Latin
203keyboard layouts do not include Latin configurations as was previous
204practice. To set up a keyboard for Latin and non-Latin input,
205change the XkbLayout keyboard driver option in the InputDevice section
206of the <filename>XF86Config</filename> or <filename>xorg.conf</filename> file.
207For example:</para>
208
209<screen> Section "InputDevice"
210 Identifier "Keyboard0"
211 Driver "Keyboard"
212 Option "XkbModel" "pc105"
213 Option "XkbLayout" "en_US,ru"
214 Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
215 EndSection</screen>
216
217<para>In this example, you can use the Alt-Shift combination to switch
218between keyboard layouts and use the Scroll Lock <acronym>LED</acronym> to
219indicate when the second layout is active.</para>
220</sect2>
221
222<!-- ================================================== -->
223<sect2>
224<title>Setting up fonts</title>
225
226<para>Users using character sets other than <acronym>ISO</acronym>-8859-1 have
227to make a few adjustments to their font settings in order to make sure that
228fonts with the correct encoding are used for "fixed", "variable", "10x20" and
229similar aliases:</para>
230
231<para>For Cyrillic alphabet, it is sufficient to put the following line
232into the top of the "Files" section in <filename>XF86Config</filename>
233or <filename>xorg.conf</filename> because this directory already contains
234the needed bitmap fonts and their aliases:</para>
235
236<screen>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/"</screen>
237
238<para>For ISO-8859-<replaceable>[X]</replaceable> based locales, use the
239following command instead:</para>
240
241<screen><userinput><command>sed -i 's,iso8859-1\( \|$\),iso8859-<replaceable>[X]</replaceable>\1,g' \
242 /usr/X11R6/lib/X11/fonts/{75dpi,100dpi,misc}/fonts.alias</command></userinput></screen>
243
244</sect2>
245
246<!-- ================================================== -->
247<sect2 id='xdm'>
248<title>Setting up XDM</title>
249<para><command>xdm</command> provides a graphical logon capability and is
250normally set up in <filename>/etc/inittab</filename>. Most of the information
251you need to customize <command>xdm</command> is found in its man page. To
252execute <command>xdm</command> during bootup, change the initdefault level to 5
253and add the following lines to <filename>/etc/inittab</filename>:</para>
254
255<indexterm zone="x-setup xdm">
256 <primary sortas="b-xdm">xdm</primary>
257</indexterm>
258
259<para><screen><userinput># Run xdm as a separate service
260x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</userinput></screen></para>
261
262<para>If Linux-PAM is installed on your system, you should
263create a PAM entry for xdm by duplicating the login entry
264using the following command:</para>
265
266<para><screen><userinput>cp /etc/pam.d/login /etc/pam.d/xdm</userinput></screen></para>
267
268</sect2>
269
270<!-- ================================================== -->
271<sect2 id='x-resources'>
272<title>Using <application>X</application> Resources</title>
273<para>There are many options that can be set in
274<application>X</application> and <application>X</application> clients via
275resources. Typically resources are set in the
276<filename>~/.Xresources</filename> file.</para>
277
278<para>The layout of the <filename>~/.Xresources</filename> file consists
279of a list of specifications in the form of</para>
280
281<indexterm zone="x-setup x-resources">
282 <primary sortas="e-AA.xresources">~/.Xresources</primary>
283</indexterm>
284
285<screen>object.subobject[.subobject...].attribute: value</screen>
286
287<para>Components of a resource specification are linked together
288by either <emphasis>tight</emphasis>, represented by a dot (.),
289or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
290A tight binding indicates that the components on either side of the dot must
291be directly next to each other as defined in a specific implementation. An
292asterisk is a wildcard character that means that any number of levels in
293a defined hierarchy can be between the components.
294For example, X offers two special cursors: redglass and whiteglass. To
295use one of these resources, you need to add the following line:</para>
296
297<screen>Xcursor.theme: whiteglass</screen>
298
299<para>However, you can specify the background for all clients with:</para>
300
301<screen>*background: blue</screen>
302
303<para>More specific resource variables will override less specific names.</para>
304
305<para>Resource definitions can be found in the man pages for each
306respective client.</para>
307
308<para>In order to load your resources, the <command>xrdb</command> program
309must be called with the appropriate parameters. Typically, the first time
310resources are loaded, you use:</para>
311
312<screen><userinput><command>xrdb -load &lt;filename&gt;</command></userinput></screen>
313
314<para>To add resources to <application>X</application>'s database in memory,
315use:</para>
316
317<screen><userinput><command>xrdb -merge &lt;filename&gt;</command></userinput></screen>
318
319<para>The <command>xrdb</command> instruction is usually placed in
320<filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
321To get more information, see the xrdb man page.</para>
322
323<indexterm zone="x-setup x-resources">
324 <primary sortas="b-xrdb">xrdb</primary>
325</indexterm>
326
327</sect2>
328
329</sect1>
330
Note: See TracBrowser for help on using the repository browser.