[071a954] | 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
|
---|
[5628618e] | 8 | in a safe and efficient manner. It is installed in XFree86 by default if
|
---|
[071a954] | 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
|
---|
[3c989e81] | 70 | <screen><userinput>mkfontscale &&
|
---|
| 71 | mkfontdir</userinput></screen></para></sect3>
|
---|
[071a954] | 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>
|
---|
[3c989e81] | 89 | </sect3>
|
---|
| 90 |
|
---|
| 91 | <sect3><title>Update the font cache files</title>
|
---|
| 92 | <para>Finally, to update all the font
|
---|
| 93 | cache files specified in <filename>/etc/fonts/fonts.conf</filename>, run
|
---|
| 94 | <screen><userinput>fc-cache</userinput></screen>
|
---|
| 95 | </para>
|
---|
[071a954] | 96 |
|
---|
| 97 | <para>XFree86 will now be able to use TrueType fonts when it is restarted.
|
---|
| 98 | You can check to see if the new fonts are available with the
|
---|
| 99 | <userinput>xlsfonts</userinput> or <userinput>xfontsel</userinput>
|
---|
[3c989e81] | 100 | program.</para>
|
---|
| 101 |
|
---|
| 102 | <note><para>You should re-run <userinput>mkfontscale</userinput> and
|
---|
| 103 | <userinput>mkfontdir</userinput> any time you add or delete TrueType fonts.
|
---|
| 104 | You should also rerun <userinput>fc-cache</userinput> each time
|
---|
| 105 | you add or remove any fonts.</para></note>
|
---|
| 106 |
|
---|
| 107 | </sect3>
|
---|
[071a954] | 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <!-- ================================================== -->
|
---|
| 111 | <sect2>
|
---|
| 112 | <title>Setting up keyboards</title>
|
---|
| 113 | <para>In this version of XFree86, it has been reported that non-latin
|
---|
| 114 | keyboard layouts do not include latin configurations as was previous
|
---|
| 115 | practice. To set up a keyboard for latin and non-latin input,
|
---|
| 116 | change the XkbLayout keyboard driver option in the InputDevice section
|
---|
| 117 | of the <filename>XF86Config</filename> file. For example:</para>
|
---|
| 118 |
|
---|
| 119 | <para><screen> Section "InputDevice"
|
---|
[3297507] | 120 | Identifier "Keyboard0"
|
---|
| 121 | Driver "Keyboard"
|
---|
| 122 | Option "XkbModel" "pc105"
|
---|
| 123 | Option "XkbLayout" "en_US,ru"
|
---|
| 124 | Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
|
---|
[071a954] | 125 | EndSection</screen></para>
|
---|
[3297507] | 126 |
|
---|
| 127 | <para>In this example, you can use the Alt-Shift combination to switch
|
---|
| 128 | between keyboard layouts and use the Scroll Lock LED to indicate when
|
---|
| 129 | the second layout is active.</para>
|
---|
[071a954] | 130 | </sect2>
|
---|
| 131 |
|
---|
| 132 | <!-- ================================================== -->
|
---|
| 133 | <sect2>
|
---|
| 134 | <title>Setting up xdm</title>
|
---|
| 135 | <para><filename>xdm</filename> provides a graphical logon capability and is
|
---|
| 136 | normally set up in <filename>/etc/inittab</filename>. Most of the information
|
---|
| 137 | you need to customize <filename>xdm</filename> is found in its man page. To
|
---|
| 138 | execute xdm during bootup, change the initdefault level to 5 and
|
---|
| 139 | add the following lines to
|
---|
| 140 | <filename>/etc/inittab</filename>:</para>
|
---|
| 141 |
|
---|
| 142 | <para><screen># Run xdm as a separate service
|
---|
| 143 | x:5:respawn:/usr/X11R6/bin/xdm -nodaemon</screen></para>
|
---|
| 144 | </sect2>
|
---|
| 145 |
|
---|
| 146 | <!-- ================================================== -->
|
---|
| 147 | <sect2>
|
---|
| 148 | <title>Using XFree86 Resources</title>
|
---|
| 149 | <para>There are many options that can be set in XFree86 and X clients via
|
---|
| 150 | resources. Typically resources are set in the <filename>~/.Xresources</filename>
|
---|
| 151 | file.</para>
|
---|
| 152 |
|
---|
| 153 | <para>The layout of the <filename>~/.Xresources</filename> file consists
|
---|
| 154 | if a list of specifications in the form of</para>
|
---|
| 155 |
|
---|
| 156 | <para><screen>object.subobject[.subobject...].attribute: value</screen></para>
|
---|
| 157 |
|
---|
| 158 | <para>Typically, components of a resource specification are linked together
|
---|
[b77b166f] | 159 | by either <emphasis>tight</emphasis>, represented by a dot (.),
|
---|
[071a954] | 160 | or <emphasis>loose</emphasis>, represented by an asterisk (*), bindings.
|
---|
| 161 | A tight binding indicates that the components on either side of the dot must
|
---|
| 162 | be directly next to each other as defined in a specific implementation. An
|
---|
| 163 | asterisk is a wildcard character that means that any number of levels in
|
---|
| 164 | a defined hierarchy can be between the components.
|
---|
| 165 | For example, XFree86 offers two new cursors: redglass and whiteglass. To
|
---|
| 166 | use one of these resources, you need to add the following line:</para>
|
---|
| 167 |
|
---|
| 168 | <para><screen>Xcursor.theme: whiteglass</screen></para>
|
---|
| 169 |
|
---|
[b77b166f] | 170 | <para>However, you can specify the background for all clients with:</para>
|
---|
[071a954] | 171 |
|
---|
| 172 | <para><screen>*background: blue</screen></para>
|
---|
| 173 |
|
---|
| 174 | <para>More specific resource variables will override less specific names. </para>
|
---|
| 175 |
|
---|
| 176 | <para>Resource definitions can be found in the man pages for each
|
---|
| 177 | respective client.</para>
|
---|
| 178 |
|
---|
| 179 | <para>In order to load your resources, the <filename>xrdb</filename>
|
---|
| 180 | program must be
|
---|
| 181 | called with the appropriate parameters. Typically, the first time
|
---|
| 182 | resources are loaded, you use:</para>
|
---|
| 183 |
|
---|
| 184 | <para><screen>xrdb -load <filename></screen></para>
|
---|
| 185 |
|
---|
| 186 | <para>To add resources to XFree86's database in memory use:</para>
|
---|
| 187 | <para><screen>xrdb -merge <filename></screen></para>
|
---|
| 188 |
|
---|
| 189 | <para>The <filename>xrdb</filename> instruction is usually placed in
|
---|
| 190 | <filename>~/.xinitrc</filename> or <filename>~/.xsession</filename>.
|
---|
| 191 | To get more information, see the <filename>xrdb</filename> man page.</para>
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
| 194 | </sect1>
|
---|
| 195 |
|
---|