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

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 feeb99a was feeb99a, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

XML update for Part VIII (X and friends)

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

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