source: x/installing/xfree86-setup.xml@ 77b3389

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 v5_1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 77b3389 was 77b3389, checked in by Bruce Dubbs <bdubbs@…>, 17 years ago

Grammar. Some udates to xorg setuo.

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

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