[d28b5ef] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[7c472863] | 8 | <sect1 id="xorg-config">
|
---|
| 9 | <?dbhtml filename="xorg-config.html"?>
|
---|
[d28b5ef] | 10 |
|
---|
| 11 | <sect1info>
|
---|
[8020e8b] | 12 | <othername>$LastChangedBy$</othername>
|
---|
| 13 | <date>$Date$</date>
|
---|
[d28b5ef] | 14 | </sect1info>
|
---|
| 15 |
|
---|
[5930509] | 16 | <title>Xorg-&xorg7-release; Testing and Configuration</title>
|
---|
[d28b5ef] | 17 |
|
---|
[5930509] | 18 | <sect2 id='X11-testing' xreflabel="Testing Xorg">
|
---|
| 19 | <title>Testing Xorg</title>
|
---|
| 20 |
|
---|
| 21 | <para>To test the <application>Xorg</application> installation, issue
|
---|
[0a30c92e] | 22 | <userinput>startx</userinput>. This command brings up a rudimentary window
|
---|
| 23 | manager called <emphasis>twm</emphasis> with three xterm windows and one
|
---|
| 24 | xclock window. The xterm window in the upper left is a login terminal and
|
---|
| 25 | running <emphasis>exit</emphasis> from this terminal will exit the
|
---|
| 26 | <application>X Window</application> session. The third xterm window may be
|
---|
| 27 | obscured on your system by the other two xterms.</para>
|
---|
[5930509] | 28 |
|
---|
| 29 | <para>Generally, there is no specific configuration required for
|
---|
| 30 | <application>Xorg</application>, but customization is possible. For details
|
---|
| 31 | see <xref linkend='xconfig'/> below.</para>
|
---|
| 32 |
|
---|
| 33 | </sect2>
|
---|
| 34 |
|
---|
| 35 | <sect2 role="configuration" id='X11R6-compat-symlink'
|
---|
[d28b5ef] | 36 | xreflabel="Creating an X11R6 Compatibility Symlink">
|
---|
| 37 |
|
---|
| 38 | <title>Creating an X11R6 Compatibility Symlink</title>
|
---|
| 39 |
|
---|
| 40 | <para>Until recently (relatively speaking) almost every
|
---|
| 41 | <application>X Window</application> installation you performed or came
|
---|
| 42 | across was installed in the
|
---|
| 43 | <filename class='directory'>/usr/X11R6</filename> directory. That was the
|
---|
| 44 | standard for years. Developers picked up on this and wrote their package
|
---|
| 45 | installation scripts looking for <application>X</application> in the
|
---|
| 46 | standard location. Things have changed and the trend is to now install
|
---|
| 47 | <application>X</application> in
|
---|
| 48 | <filename class='directory'>/usr</filename>. Some people want to install
|
---|
| 49 | it in a custom location.</para>
|
---|
| 50 |
|
---|
| 51 | <para>Many package developers have not caught up to the change and their
|
---|
| 52 | packages are still trying to find <application>X</application> in
|
---|
| 53 | <filename class='directory'>/usr/X11R6</filename> and subsequently fail
|
---|
| 54 | when you try to build the package. Though for most packages it is not
|
---|
| 55 | difficult to 'hack' the installation script to fix the problem, that is not
|
---|
| 56 | the long term solution to the problem. Upstream developers need to modernize
|
---|
| 57 | their installation scripts and eliminate the problem altogether.</para>
|
---|
| 58 |
|
---|
| 59 | <para>Until then, you can create a symbolic link to satisfy the
|
---|
| 60 | <filename class='directory'>/usr/X11R6</filename> requirement so that you
|
---|
| 61 | won't be inconvenienced with a package build failure due to this known
|
---|
| 62 | issue. If you wish to create the symlink, issue the following command as
|
---|
| 63 | the <systemitem class="username">root</systemitem> user (ensure you modify
|
---|
| 64 | <replaceable><$XORG_PREFIX></replaceable> appropriately):</para>
|
---|
| 65 |
|
---|
| 66 | <screen role="root"><userinput>ln -vsf <replaceable><$XORG_PREFIX></replaceable> /usr/X11R6</userinput></screen>
|
---|
| 67 |
|
---|
[5930509] | 68 | </sect2>
|
---|
[d28b5ef] | 69 |
|
---|
| 70 | <sect2 role="configuration" id="xft-font-protocol" xreflabel="Xft Font Protocol">
|
---|
| 71 | <title>Xft Font Protocol</title>
|
---|
| 72 |
|
---|
| 73 | <indexterm role="configuration" id=" fonts">
|
---|
| 74 | <primary sortas="g-truetype">TrueType Fonts</primary>
|
---|
| 75 | </indexterm>
|
---|
| 76 |
|
---|
| 77 | <para>Xft provides antialiased font rendering through
|
---|
| 78 | <application>Freetype</application>, and fonts are controlled from the
|
---|
| 79 | client side using <application>Fontconfig</application>. The default
|
---|
| 80 | search path is <filename class="directory">/usr/share/fonts</filename>
|
---|
| 81 | and <filename class="directory">~/.fonts</filename>.
|
---|
| 82 | <application>Fontconfig</application> searches directories in its
|
---|
| 83 | path recursively and maintains a cache of the font characteristics in
|
---|
| 84 | <filename>fonts.cache-1</filename> files in each directory. If the cache
|
---|
| 85 | appears to be out of date, it is ignored, and information is (slowly)
|
---|
| 86 | fetched from the fonts themselves. This cache
|
---|
| 87 | can be regenerated using the <command>fc-cache</command> command at any
|
---|
| 88 | time. You can see the list of fonts known by
|
---|
| 89 | <application>Fontconfig</application> by running the command
|
---|
| 90 | <command>fc-list</command>.</para>
|
---|
| 91 |
|
---|
| 92 | <para>If you've installed <application>Xorg</application> in any prefix
|
---|
| 93 | other than <filename class="directory">/usr</filename>, the
|
---|
| 94 | <application>X</application> fonts were not installed in a
|
---|
| 95 | location known to <application>Fontconfig</application>. This prevents
|
---|
| 96 | <application>Fontconfig</application> from using the poorly rendered
|
---|
| 97 | Type 1 fonts or the non-scalable bitmapped fonts. Symlinks were created
|
---|
| 98 | from the <filename class="directory">OTF</filename> and <filename
|
---|
| 99 | class="directory">TTF</filename> <application>X</application> font
|
---|
| 100 | directories to <filename
|
---|
| 101 | class="directory">/usr/share/fonts/X11-{OTF,TTF}</filename>. This allows
|
---|
| 102 | <application>Fontconfig</application> to use the OpenType and TrueType
|
---|
| 103 | fonts provided by <application>X</application> (which are scalable and
|
---|
| 104 | of higher quality).</para>
|
---|
| 105 |
|
---|
| 106 | <para><application>Fontconfig</application> uses names such as
|
---|
| 107 | "Monospace 12" to define fonts. Applications generally use generic font
|
---|
| 108 | names such as "Monospace", "Sans" and "Serif".
|
---|
| 109 | <application>Fontconfig</application> resolves these names to a font that
|
---|
| 110 | has all characters that cover the orthography of the language indicated
|
---|
| 111 | by the locale settings. Knowledge of these font names is included in
|
---|
| 112 | <filename>/etc/fonts/fonts.conf</filename>. Fonts that are not listed
|
---|
| 113 | in this file are still usable by <application>Fontconfig</application>,
|
---|
| 114 | but they will not be accessible by the generic family names.</para>
|
---|
| 115 |
|
---|
| 116 | <para>Standard scalable fonts that come with <application>X</application>
|
---|
| 117 | provide very poor Unicode coverage. You may notice in applications that
|
---|
| 118 | use <application>Xft</application> that some characters appear as a box
|
---|
| 119 | with four binary digits inside. In this case, a font set with the
|
---|
| 120 | available glyphs has not been found. Other times, applications that
|
---|
| 121 | don't use other font families by default and don't accept substitutions
|
---|
| 122 | from <application>Fontconfig</application> will display blank lines when
|
---|
| 123 | the default font doesn't cover the orthography of the user's language.
|
---|
| 124 | This happens, e.g., with <application>Fluxbox</application> in the
|
---|
| 125 | ru_RU.KOI8-R locale.</para>
|
---|
| 126 |
|
---|
| 127 | <para>In order to provide greater Unicode coverage, it is recommended
|
---|
| 128 | that you install these fonts:</para>
|
---|
| 129 |
|
---|
| 130 | <itemizedlist>
|
---|
| 131 | <listitem>
|
---|
| 132 | <para><ulink url="http://dejavu.sourceforge.net/">DejaVu fonts</ulink>
|
---|
| 133 | - These fonts are replacements for the Bitstream Vera fonts and
|
---|
| 134 | provide Latin-based scripts with accents and Cyrillic glyphs.</para>
|
---|
| 135 | </listitem>
|
---|
| 136 | <listitem>
|
---|
| 137 | <para><ulink
|
---|
| 138 | url="http://download.savannah.nongnu.org/releases/freefont/">FreeFont</ulink>
|
---|
| 139 | - This set of fonts covers nearly every non-CJK character, but is not
|
---|
| 140 | visually pleasing. <application>Fontconfig</application> will use it
|
---|
| 141 | as a last resort to substitute generic font family names.</para>
|
---|
| 142 | </listitem>
|
---|
| 143 | <listitem>
|
---|
| 144 | <para><ulink
|
---|
| 145 | url="http://corefonts.sourceforge.net/">Microsoft Core fonts</ulink>
|
---|
| 146 | - These fonts provide slightly worse Unicode coverage than FreeFont,
|
---|
| 147 | but are better hinted. Be sure to read the license before using
|
---|
| 148 | them. These fonts are listed in the aliases in the
|
---|
| 149 | <filename class="directory">/etc/fonts/fonts.d</filename> directory
|
---|
| 150 | by default.</para>
|
---|
| 151 | </listitem>
|
---|
| 152 | <listitem>
|
---|
| 153 | <para><ulink
|
---|
| 154 | url="http://cle.linux.org.tw/fonts/FireFly">Firefly New Sung font</ulink>
|
---|
| 155 | - This font provides Chinese coverage. This font is listed in the
|
---|
| 156 | aliases in the
|
---|
| 157 | the <filename class="directory">/etc/fonts/fonts.d</filename>
|
---|
| 158 | directory by default.</para>
|
---|
| 159 | </listitem>
|
---|
| 160 | <listitem>
|
---|
| 161 | <para><ulink
|
---|
| 162 | url="http://cle.linux.org.tw/fonts/Arphic">Arphic fonts</ulink> -
|
---|
| 163 | A similar set of Chinese fonts to the Firefly New Sung font.
|
---|
| 164 | These fonts are listed in the aliases in the
|
---|
| 165 | <filename class="directory">/etc/fonts/fonts.d</filename> directory
|
---|
| 166 | by default.</para>
|
---|
| 167 | </listitem>
|
---|
| 168 | <listitem>
|
---|
| 169 | <para><ulink
|
---|
| 170 | url="http://sourceforge.jp/projects/efont/">Kochi fonts</ulink> -
|
---|
| 171 | These provide Japanese characters, and are listed in the aliases
|
---|
| 172 | in the <filename class="directory">/etc/fonts/fonts.d</filename>
|
---|
| 173 | directory by default.</para>
|
---|
| 174 | </listitem>
|
---|
| 175 | <listitem>
|
---|
| 176 | <para><ulink
|
---|
| 177 | url="http://kldp.net/projects/baekmuk/">Baekmuk fonts</ulink>
|
---|
| 178 | - These fonts provide Korean coverage, and are listed in the
|
---|
| 179 | aliases in the
|
---|
| 180 | <filename class="directory">/etc/fonts/fonts.d</filename> directory
|
---|
| 181 | by default.</para>
|
---|
| 182 | </listitem>
|
---|
[deb8fc07] | 183 | <listitem>
|
---|
| 184 | <para><ulink
|
---|
| 185 | url="&gnome-download-http;/cantarell-fonts/0.0/">Cantarell fonts</ulink>
|
---|
| 186 | - The Cantarell typeface family provides a contemporary Humanist sans
|
---|
| 187 | serif. It is particularly optimised for legibility at small sizes and is
|
---|
| 188 | the preferred font family for the <application>GNOME-3</application> user
|
---|
| 189 | interface.</para>
|
---|
| 190 | </listitem>
|
---|
[d28b5ef] | 191 | </itemizedlist>
|
---|
| 192 |
|
---|
| 193 | <para>The list above will not provide complete Unicode coverage. For
|
---|
| 194 | more information, please visit the <ulink
|
---|
| 195 | url="http://unifont.org/fontguide/">Unicode Font Guide</ulink>.</para>
|
---|
| 196 |
|
---|
| 197 | <para>As an example, consider the installation of the DejaVu fonts. From
|
---|
| 198 | the unpacked source directory, run the following commands as the
|
---|
| 199 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 200 |
|
---|
| 201 | <screen role="root"><userinput>install -v -d -m755 /usr/share/fonts/dejavu &&
|
---|
| 202 | install -v -m644 *.ttf /usr/share/fonts/dejavu &&
|
---|
| 203 | fc-cache -v /usr/share/fonts/dejavu</userinput></screen>
|
---|
| 204 |
|
---|
| 205 | </sect2>
|
---|
| 206 |
|
---|
| 207 | <sect2 role="configuration" id='xconfig'>
|
---|
| 208 | <title>Setting up Xorg Devices</title>
|
---|
| 209 | <para>For most hardware configurations, modern Xorg will automatically
|
---|
| 210 | get the server configuration correct without any user intervention. There
|
---|
| 211 | are, however, some cases where auto-configuration will be incorrect.
|
---|
| 212 | Following are some example manual configuration items that may be of use in
|
---|
| 213 | these instances.</para>
|
---|
| 214 |
|
---|
| 215 | <sect3 id="xinput">
|
---|
| 216 | <title>Setting up X Input Devices</title>
|
---|
| 217 | <para>For most input devices, no additional configuration will be
|
---|
| 218 | necessary. This section is provided for informational purposes only.</para>
|
---|
| 219 |
|
---|
| 220 | <para>A sample default XKB setup could look like the following (executed as
|
---|
| 221 | the <systemitem class="username">root</systemitem> user):</para>
|
---|
| 222 | <screen><userinput role="username">cat > /etc/X11/xorg.conf.d/xkb-defaults.conf << "EOF"
|
---|
| 223 | Section "InputClass"
|
---|
| 224 | Identifier "XKB Defaults"
|
---|
| 225 | MatchIsKeyboard "yes"
|
---|
| 226 | Option "XkbOptions" "terminate:ctrl_alt_bksp"
|
---|
| 227 | EOF</userinput></screen>
|
---|
| 228 |
|
---|
| 229 | </sect3>
|
---|
| 230 |
|
---|
| 231 | <sect3 id="xdisplay">
|
---|
| 232 | <title>Fine Tuning Display Settings</title>
|
---|
| 233 | <para>Again, with modern Xorg, little or no additional configuration is
|
---|
| 234 | necessary. If you should need extra options passed to your video driver,
|
---|
| 235 | for instance, you could use something like the following (again, executed as
|
---|
| 236 | the <systemitem class="username">root</systemitem> user):</para>
|
---|
| 237 |
|
---|
| 238 | <screen><userinput role="root">cat > /etc/X11/xorg.conf.d/videocard-0.conf << "EOF"
|
---|
| 239 | Section "Device"
|
---|
| 240 | Identifier "Videocard0"
|
---|
| 241 | Driver "radeon"
|
---|
| 242 | VendorName "Videocard vendor"
|
---|
| 243 | BoardName "ATI Radeon 7500"
|
---|
| 244 | Option "NoAccel" "true"
|
---|
| 245 | EndSection
|
---|
| 246 | EOF</userinput></screen>
|
---|
| 247 |
|
---|
| 248 | <para>Another common setup is having multiple server layouts for use in
|
---|
| 249 | different environments. Though the server will automatically detect the
|
---|
| 250 | presence of another monitor, it may get the order incorrect:</para>
|
---|
| 251 |
|
---|
| 252 | <screen><userinput role="root">cat > /etc/X11/xorg.conf.d/server-layout.conf << "EOF"
|
---|
| 253 | Section "ServerLayout"
|
---|
| 254 | Identifier "DefaultLayout"
|
---|
| 255 | Screen 0 "Screen0" 0 0
|
---|
| 256 | Screen 1 "Screen1" LeftOf "Screen0"
|
---|
| 257 | Option "Xinerama"
|
---|
| 258 | EndSection
|
---|
| 259 | EOF</userinput></screen>
|
---|
| 260 |
|
---|
| 261 | </sect3>
|
---|
| 262 | </sect2>
|
---|
| 263 | </sect1>
|
---|