source: x/installing/x-setup.xml@ 793c1ba

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 793c1ba was 286510e1, checked in by DJ Lucas <dj@…>, 19 years ago

added font perms note and created applicationss directory for ooo.

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

  • Property mode set to 100644
File size: 11.1 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.
56Ensure that any fonts you install are world readable. Incorrect
57permissions on fonts have been known to cause problems with some X
58applications.</para></listitem>
59
60<listitem><para>Download the fonts.</para></listitem>
61
62<listitem><para>Create the <filename>fonts.scale</filename> and
63<filename>fonts.dir</filename> files in the
64<application>TrueType</application> font
65directory.</para></listitem>
66
67<listitem><para>Ensure the <application>TrueType</application> module is loaded in the
68<filename>XF86Config</filename> or <filename>xorg.conf</filename>.</para></listitem>
69
70<listitem><para>Ensure the <parameter>FontPath</parameter> in
71<filename>XF86Config</filename> or <filename>xorg.conf</filename> contains the
72<application>TrueType</application> font directory.</para></listitem>
73
74<listitem><para>Update the font cache files</para></listitem>
75
76</itemizedlist>
77
78<sect3><title>Establish a <application>TrueType</application> font directory</title>
79
80<para>The build of <application>X</application> as given above
81automatically creates a <application>TrueType</application>
82font directory: <filename class="directory">/usr/X11R6/lib/X11/fonts/TTF</filename>. This
83directory already has some <application>TrueType</application> fonts and is set up correctly.
84If this directory is satisfactory, copy any other
85<application>TrueType</application> fonts you want
86into that directory. If not, create a new directory, preferably in
87the <filename class="directory">/usr/X11R6/lib/X11/fonts/</filename> directory and put
88your <application>TrueType</application> fonts there.</para></sect3>
89
90<sect3><title>Download the fonts</title>
91
92<para>There are two known high quality free font resources:
93<ulink url="ftp://ftp.gnu.org/savannah/files/freefont/"/> and <ulink
94url="http://corefonts.sourceforge.net/"/>. Copy the fonts (files with
95the <filename>.ttf</filename> suffix) to the directory you've just
96created.</para>
97
98</sect3>
99
100<sect3><title>Create <filename>fonts.scale</filename> and
101<filename>fonts.dir</filename></title>
102
103<para>Now change to the directory where you have your
104<application>TrueType</application> fonts and run:
105<screen><userinput><command>mkfontscale &amp;&amp;
106mkfontdir</command></userinput></screen></para></sect3>
107
108<sect3><title>Ensure <application>TrueType</application> is loaded in
109<filename>XF86Config</filename> or <filename>xorg.conf</filename></title>
110<para>The "Module" section should look like:
111<screen>Section "Module"
112 ...
113 Load "freetype"
114 ...
115EndSection</screen></para></sect3>
116
117<sect3><title>Ensure the <parameter>FontPath</parameter> in
118<filename>XF86Config</filename> or <filename>xorg.conf</filename> points to the
119<application>TrueType</application> font directory</title>
120<para>The "Files" section should look like:
121<screen>Section "Files"
122 ...
123 FontPath "/usr/X11R6/lib/X11/fonts/<replaceable>[TrueTypeDir]</replaceable>/"
124 ...
125EndSection</screen></para>
126</sect3>
127
128<sect3><title>Update the font cache files</title>
129
130<para>Ensure you have the following directory entries in
131<filename>/etc/fonts/local.conf</filename>, inside the fontconfig
132tags:</para>
133
134<screen><userinput><command>sed -i -e '/^&lt;\/fontconfig&gt;/i\
135&lt;dir&gt;/usr/X11R6/lib/X11/fonts/TTF&lt;/dir&gt;\
136&lt;dir&gt;/usr/X11R6/lib/X11/fonts/Type1&lt;/dir&gt;' /etc/fonts/local.conf</command></userinput></screen>
137
138<para>The <command>fc-cache</command> program will automatically search
139the above directories and all subdirectories for needed fonts.</para>
140
141<para>Finally, to update all the font
142cache files, run</para>
143<screen><userinput><command>fc-cache</command></userinput></screen>
144
145<para><application>X</application> will now be able to use
146<application>TrueType</application> fonts when it is restarted.
147You can check to see if the new fonts are available with the
148<command>xlsfonts</command> or <command>xfontsel</command>
149program.</para>
150
151<note><para>You should rerun <command>mkfontscale</command> and
152<command>mkfontdir</command> any time you add or delete
153<application>TrueType</application> fonts.
154You should also rerun <command>fc-cache</command> each time
155you add or remove any fonts.</para></note>
156
157</sect3>
158</sect2>
159
160<!-- ================================================== -->
161<sect2>
162<title>Setting up keyboards</title>
163<para>In this version of <application>X</application>, non-Latin
164keyboard layouts do not include Latin configurations as was previous
165practice. To set up a keyboard for Latin and non-Latin input,
166change the XkbLayout keyboard driver option in the InputDevice section
167of the <filename>XF86Config</filename> or <filename>xorg.conf</filename> file. For example:</para>
168
169<screen> Section "InputDevice"
170 Identifier "Keyboard0"
171 Driver "Keyboard"
172 Option "XkbModel" "pc105"
173 Option "XkbLayout" "en_US,ru"
174 Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
175 EndSection</screen>
176
177<para>In this example, you can use the Alt-Shift combination to switch
178between keyboard layouts and use the Scroll Lock <acronym>LED</acronym> to indicate when
179the second layout is active.</para>
180</sect2>
181
182<!-- ================================================== -->
183<sect2>
184<title>Setting up fonts</title>
185
186<para>Users using character sets other than <acronym>ISO</acronym>-8859-1 have to
187make a few adjustments to their font settings in order to
188make sure that fonts with
189the correct encoding are used for "fixed", "variable", "10x20" and
190similar aliases:</para>
191
192<para>For Cyrillic alphabet, it is sufficient to put the following line
193into the top of the "Files" section in <filename>XF86Config</filename>
194or <filename>xorg.conf</filename>
195because this directory already contains the needed bitmap fonts and
196their aliases:</para>
197
198<screen>FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/"</screen>
199
200<para>For ISO-8859-<replaceable>[X]</replaceable> based locales, use the
201following command instead:</para>
202
203<screen><userinput><command>sed -i 's,iso8859-1\( \|$\),iso8859-<replaceable>[X]</replaceable>\1,g' \
204 /usr/X11R6/lib/X11/fonts/{75dpi,100dpi,misc}/fonts.alias</command></userinput></screen>
205
206</sect2>
207
208<!-- ================================================== -->
209<sect2>
210<title>Setting up XDM</title>
211<para><command>xdm</command> provides a graphical logon capability and is
212normally set up in <filename>/etc/inittab</filename>. Most of the information
213you need to customize <command>xdm</command> is found in its man page. To
214execute <command>xdm</command> during bootup, change the initdefault level to 5
215and add the following lines to <filename>/etc/inittab</filename>:</para>
216
217<para><screen><userinput># Run xdm as a separate service
218x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</userinput></screen></para>
219
220<para>If Linux-PAM is installed on your system, you should
221create a PAM entry for xdm by duplicating the login entry
222using the following command:</para>
223
224<para><screen><userinput>cp /etc/pam.d/login /etc/pam.d/xdm</userinput></screen></para>
225
226</sect2>
227
228<!-- ================================================== -->
229<sect2>
230<title>Using <application>X</application> Resources</title>
231<para>There are many options that can be set in
232<application>X</application> and <application>X</application> clients via
233resources. Typically resources are set in the <filename>~/.Xresources</filename>
234file.</para>
235
236<para>The layout of the <filename>~/.Xresources</filename> file consists
237of a list of specifications in the form of</para>
238
239<screen>object.subobject[.subobject...].attribute: value</screen>
240
241<para>Components of a resource specification are linked together
242by either <emphasis>tight</emphasis>, represented by a dot (.),
243or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
244A tight binding indicates that the components on either side of the dot must
245be directly next to each other as defined in a specific implementation. An
246asterisk is a wildcard character that means that any number of levels in
247a defined hierarchy can be between the components.
248For example, X offers two special cursors: redglass and whiteglass. To
249use one of these resources, you need to add the following line:</para>
250
251<screen>Xcursor.theme: whiteglass</screen>
252
253<para>However, you can specify the background for all clients with:</para>
254
255<screen>*background: blue</screen>
256
257<para>More specific resource variables will override less specific names. </para>
258
259<para>Resource definitions can be found in the man pages for each
260respective client.</para>
261
262<para>In order to load your resources, the <command>xrdb</command>
263program must be
264called with the appropriate parameters. Typically, the first time
265resources are loaded, you use:</para>
266
267<screen><userinput><command>xrdb -load &lt;filename&gt;</command></userinput></screen>
268
269<para>To add resources to <application>X</application>'s database in memory, use:</para>
270<screen><userinput><command>xrdb -merge &lt;filename&gt;</command></userinput></screen>
271
272<para>The <command>xrdb</command> instruction is usually placed in
273<filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
274To get more information, see the xrdb man page.</para>
275</sect2>
276
277</sect1>
278
Note: See TracBrowser for help on using the repository browser.