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