source: x/installing/xfree86-setup.xml@ 77b3389

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 v5_1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 77b3389 was 77b3389, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

Grammar. Some udates to xorg setuo.

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

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