source: x/installing/xorg-config.xml@ 5930509

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5930509 was 5930509, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Added a section on testing Xorg.
Updated to pixman-0.24.0.

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

  • Property mode set to 100644
File size: 12.0 KB
Line 
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
8<sect1 id="xorg-config">
9 <?dbhtml filename="xorg-config.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Xorg-&xorg7-release; Testing and Configuration</title>
17
18 <sect2 id='X11-testing' xreflabel="Testing Xorg">
19 <title>Testing Xorg</title>
20
21 <para>To test the <application>Xorg</application> installation, issue
22 <userinput>startx</userinput>. This command brings up a rudimentary
23 window manager called <emphasis>twm</emphasis> with three xterm and one
24 xclock window. The xterm window in the upper left is a login terminal
25 and running <emphasis>exit</emphasis> from this terminal will exit
26 the <application>X Window</application> session. the third xterm
27 window may be obscured on your system by the other two xterms.</para>
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'
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>&lt;$XORG_PREFIX&gt;</replaceable> appropriately):</para>
65
66<screen role="root"><userinput>ln -vsf <replaceable>&lt;$XORG_PREFIX&gt;</replaceable> /usr/X11R6</userinput></screen>
67
68 </sect2>
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>
183 </itemizedlist>
184
185 <para>The list above will not provide complete Unicode coverage. For
186 more information, please visit the <ulink
187 url="http://unifont.org/fontguide/">Unicode Font Guide</ulink>.</para>
188
189 <para>As an example, consider the installation of the DejaVu fonts. From
190 the unpacked source directory, run the following commands as the
191 <systemitem class="username">root</systemitem> user:</para>
192
193<screen role="root"><userinput>install -v -d -m755 /usr/share/fonts/dejavu &amp;&amp;
194install -v -m644 *.ttf /usr/share/fonts/dejavu &amp;&amp;
195fc-cache -v /usr/share/fonts/dejavu</userinput></screen>
196
197 </sect2>
198
199 <sect2 role="configuration" id='xconfig'>
200 <title>Setting up Xorg Devices</title>
201 <para>For most hardware configurations, modern Xorg will automatically
202 get the server configuration correct without any user intervention. There
203 are, however, some cases where auto-configuration will be incorrect.
204 Following are some example manual configuration items that may be of use in
205 these instances.</para>
206
207 <sect3 id="xinput">
208 <title>Setting up X Input Devices</title>
209 <para>For most input devices, no additional configuration will be
210 necessary. This section is provided for informational purposes only.</para>
211
212 <para>A sample default XKB setup could look like the following (executed as
213 the <systemitem class="username">root</systemitem> user):</para>
214<screen><userinput role="username">cat &gt; /etc/X11/xorg.conf.d/xkb-defaults.conf &lt;&lt; "EOF"
215Section "InputClass"
216 Identifier "XKB Defaults"
217 MatchIsKeyboard "yes"
218 Option "XkbOptions" "terminate:ctrl_alt_bksp"
219EOF</userinput></screen>
220
221 </sect3>
222
223 <sect3 id="xdisplay">
224 <title>Fine Tuning Display Settings</title>
225 <para>Again, with modern Xorg, little or no additional configuration is
226 necessary. If you should need extra options passed to your video driver,
227 for instance, you could use something like the following (again, executed as
228 the <systemitem class="username">root</systemitem> user):</para>
229
230<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/videocard-0.conf &lt;&lt; "EOF"
231Section "Device"
232 Identifier "Videocard0"
233 Driver "radeon"
234 VendorName "Videocard vendor"
235 BoardName "ATI Radeon 7500"
236 Option "NoAccel" "true"
237EndSection
238EOF</userinput></screen>
239
240 <para>Another common setup is having multiple server layouts for use in
241 different environments. Though the server will automatically detect the
242 presence of another monitor, it may get the order incorrect:</para>
243
244<screen><userinput role="root">cat &gt; /etc/X11/xorg.conf.d/server-layout.conf &lt;&lt; "EOF"
245Section "ServerLayout"
246 Identifier "DefaultLayout"
247 Screen 0 "Screen0" 0 0
248 Screen 1 "Screen1" LeftOf "Screen0"
249 Option "Xinerama"
250EndSection
251EOF</userinput></screen>
252
253 </sect3>
254 </sect2>
255</sect1>
Note: See TracBrowser for help on using the repository browser.