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

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 a0f03b0 was a0f03b0, checked in by Archaic <archaic@…>, 20 years ago

Inserting sect1info

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

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