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
|
---|
8 | in a safe and efficient manner. It is installed in
|
---|
9 | <application>XFree86</application> by default if
|
---|
10 | you have a supported video card. To check if <acronym>DRI</acronym> is installed properly,
|
---|
11 | check the log file <filename>/var/log/XFree86.0.log</filename> for statements
|
---|
12 | 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>.
|
---|
20 | This program brings up a window with three gears turning. The
|
---|
21 | <command>xterm</command> will display how many frames were drawn every
|
---|
22 | five seconds so this is a reasonable benchmark. The window is scalable, and
|
---|
23 | the frames drawn per second is highly dependent on the size of
|
---|
24 | the 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
|
---|
39 | be 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
|
---|
49 | directory.</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
|
---|
57 | directory.</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
|
---|
64 | automatically creates a <application>TrueType</application>
|
---|
65 | font directory: <filename class="directory">/usr/X11R6/lib/X11/fonts/TTF</filename>. This
|
---|
66 | directory already has some <application>TrueType</application> fonts and is set up correctly.
|
---|
67 | If this directory is satisfactory, copy any other
|
---|
68 | <application>TrueType</application> fonts you want
|
---|
69 | into that directory. If not, create a new directory, preferably in
|
---|
70 | the <filename class="directory">/usr/X11R6/lib/X11/fonts/</filename> directory and put
|
---|
71 | your <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 &&
|
---|
79 | mkfontdir</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 | ...
|
---|
87 | EndSection</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 | ...
|
---|
97 | EndSection</screen></para>
|
---|
98 | </sect3>
|
---|
99 |
|
---|
100 | <sect3><title>Update the font cache files</title>
|
---|
101 | <para>Finally, to update all the font
|
---|
102 | cache 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.
|
---|
107 | You can check to see if the new fonts are available with the
|
---|
108 | <command>xlsfonts</command> or <command>xfontsel</command>
|
---|
109 | program.</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.
|
---|
114 | You should also rerun <command>fc-cache</command> each time
|
---|
115 | you 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
|
---|
124 | keyboard layouts do not include Latin configurations as was previous
|
---|
125 | practice. To set up a keyboard for Latin and non-Latin input,
|
---|
126 | change the XkbLayout keyboard driver option in the InputDevice section
|
---|
127 | of 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
|
---|
138 | between keyboard layouts and use the Scroll Lock <acronym>LED</acronym> to indicate when
|
---|
139 | the 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
|
---|
146 | normally set up in <filename>/etc/inittab</filename>. Most of the information
|
---|
147 | you need to customize <command>xdm</command> is found in its man page. To
|
---|
148 | execute <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
|
---|
151 | x: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
|
---|
159 | resources. Typically resources are set in the <filename>~/.Xresources</filename>
|
---|
160 | file.</para>
|
---|
161 |
|
---|
162 | <para>The layout of the <filename>~/.Xresources</filename> file consists
|
---|
163 | if 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
|
---|
168 | by either <emphasis>tight</emphasis>, represented by a dot (.),
|
---|
169 | or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
|
---|
170 | A tight binding indicates that the components on either side of the dot must
|
---|
171 | be directly next to each other as defined in a specific implementation. An
|
---|
172 | asterisk is a wildcard character that means that any number of levels in
|
---|
173 | a defined hierarchy can be between the components.
|
---|
174 | For example, XFree86 offers two new cursors: redglass and whiteglass. To
|
---|
175 | use 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
|
---|
186 | respective client.</para>
|
---|
187 |
|
---|
188 | <para>In order to load your resources, the <command>xrdb</command>
|
---|
189 | program must be
|
---|
190 | called with the appropriate parameters. Typically, the first time
|
---|
191 | resources are loaded, you use:</para>
|
---|
192 |
|
---|
193 | <screen><userinput><command>xrdb -load <filename></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 <filename></command></userinput></screen>
|
---|
197 |
|
---|
198 | <para>The <command>xrdb</command> instruction is usually placed in
|
---|
199 | <filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
|
---|
200 | To get more information, see the xrdb man page.</para>
|
---|
201 | </sect2>
|
---|
202 |
|
---|
203 | </sect1>
|
---|
204 |
|
---|