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

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 e123f715 was d28b5ef, checked in by DJ Lucas <dj@…>, 13 years ago

Removed old Xorg configuration and setup pages and added an initial combined configuration page. Comments and suggestions will be very much appreciated.

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

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