source: x/installing/xfree86-setup.xml@ 5836d75

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 v5_0 v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5836d75 was 5836d75, checked in by Larry Lawrence <larry@…>, 21 years ago

patch for whitespace

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

  • Property mode set to 100644
File size: 8.4 KB
Line 
1<sect1 id="x-setup">
2<?dbhtml filename="xfree86-setup.html" dir="x"?>
3<title>XFree86 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>XFree86</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> for statements
12like:</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<userinput><ulink url="http://dri.sourceforge.net/doc/DRIuserguide.html"/></userinput>.
28</para>
29</sect2>
30
31<!-- ================================================== -->
32
33<sect2>
34<title>Adding <application>TrueType</application> fonts to
35<application>XFree86</application></title>
36
37<para><application>TrueType</application> font support is built into
38<application>XFree86</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
52<filename>XF86Config</filename>.</para></listitem>
53
54<listitem><para>Ensure the <parameter>FontPath</parameter> in
55<filename>XF86Config</filename> contains the
56<application>TrueType</application> font
57directory.</para></listitem>
58
59</itemizedlist>
60
61<sect3><title>Establish a <application>TrueType</application> font directory</title>
62
63<para>The build of <application>XFree86</application> as given above
64automatically creates a <application>TrueType</application>
65font directory: <filename class="directory">/usr/X11R6/lib/X11/fonts/TTF</filename>. This
66directory already has some <application>TrueType</application> fonts and is set up correctly.
67If this directory is satisfactory, copy any other
68<application>TrueType</application> fonts you want
69into that directory. If not, create a new directory, preferably in
70the <filename class="directory">/usr/X11R6/lib/X11/fonts/</filename> directory and put
71your <application>TrueType</application> fonts there.</para></sect3>
72
73<sect3><title>Create <filename>fonts.scale</filename> and
74<filename>fonts.dir</filename></title>
75
76<para>Now change to the directory where you have your
77<application>TrueType</application> fonts and run
78<screen><userinput><command>mkfontscale &amp;&amp;
79mkfontdir</command></userinput></screen></para></sect3>
80
81<sect3><title>Ensure <application>TrueType</application> is loaded in <filename>XF86Config</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>XFree86</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 re-run <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>XFree86</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> 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 and add the following lines to <filename>/etc/inittab</filename>:</para>
149
150<para><screen><userinput># Run xdm as a separate service
151x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</userinput></screen></para>
152</sect2>
153
154<!-- ================================================== -->
155<sect2>
156<title>Using <application>XFree86</application> Resources</title>
157<para>There are many options that can be set in
158<application>XFree86</application> and <application>X</application> clients via
159resources. Typically resources are set in the <filename>~/.Xresources</filename>
160file.</para>
161
162<para>The layout of the <filename>~/.Xresources</filename> file consists
163if a list of specifications in the form of</para>
164
165<screen>object.subobject[.subobject...].attribute: value</screen>
166
167<para>Typically, components of a resource specification are linked together
168by either <emphasis>tight</emphasis>, represented by a dot (.),
169or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
170A tight binding indicates that the components on either side of the dot must
171be directly next to each other as defined in a specific implementation. An
172asterisk is a wildcard character that means that any number of levels in
173a defined hierarchy can be between the components.
174For example, XFree86 offers two new cursors: redglass and whiteglass. To
175use one of these resources, you need to add the following line:</para>
176
177<screen>Xcursor.theme: whiteglass</screen>
178
179<para>However, you can specify the background for all clients with:</para>
180
181<screen>*background: blue</screen>
182
183<para>More specific resource variables will override less specific names. </para>
184
185<para>Resource definitions can be found in the man pages for each
186respective client.</para>
187
188<para>In order to load your resources, the <command>xrdb</command>
189program must be
190called with the appropriate parameters. Typically, the first time
191resources are loaded, you use:</para>
192
193<screen><userinput><command>xrdb -load &lt;filename&gt;</command></userinput></screen>
194
195<para>To add resources to <application>XFree86</application>'s database in memory use:</para>
196<screen><userinput><command>xrdb -merge &lt;filename&gt;</command></userinput></screen>
197
198<para>The <command>xrdb</command> instruction is usually placed in
199<filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
200To get more information, see the xrdb man page.</para>
201</sect2>
202
203</sect1>
204
Note: See TracBrowser for help on using the repository browser.