0175-0178.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 403 行
HTML
403 行
<HTML>
<HEAD>
<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:X Window</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311739 //-->
<!-- TITLE=RED HAT LINUX 2ND EDITION //-->
<!-- AUTHOR=DAVID PITTS ET AL //-->
<!-- PUBLISHER=MACMILLAN //-->
<!-- IMPRINT=SAMS PUBLISHING //-->
<!-- PUBLICATION DATE=1998 //-->
<!-- CHAPTER=10 //-->
<!-- PAGES=0175-0194 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="../ch09/0174-0174.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0179-0182.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-175"><P>Page 175</P></A>
<H3><A NAME="ch10_ 1">
CHAPTER 10
</A></H3>
<H2>
X Window
</H2>
<B>by Kamran Husain
</B>
<H3><A NAME="ch10_ 2">
IN THIS CHAPTER
</A></H3>
<UL>
<LI> Setting Up Your XFree86 System 176
<LI> The XF86Config File 176
<LI> Using Xconfigurator 177
<LI> Examining the XF86Config File 177
<LI> The .xinitrc File 185
<LI> The Personal X Resource File 186
<LI> Using xdm 187
<LI> Configuration of the Window Manager 188
<LI> Compiling Programs That Use X 188
<LI> Some Common Problems 189
<LI> Compiling Sources for XFree86 190
</UL>
<A NAME="PAGENUM-176"><P>Page 176</P></A>
<P>This chapter details the way to configure the X Window System for Linux. This version of <BR>
X Window for Linux is called XFree86 version 3.3.1.
</P>
<P>This chapter covers the following topics with regard to configuring your X Window System:
</P>
<UL>
<LI> How to configure XFree86 on your system
<LI> Working with the xf86config program and the XF86Config file
<LI> What the .xinitrc file is
<LI> Your personal X resource file
<LI> Using xdm
<LI> Configuration of the window manager
</UL>
<H3><A NAME="ch10_ 3">
Setting Up Your XFree86 System
</A></H3>
<P>This section covers another one of the most difficult, time-consuming, and frustrating parts
of installing XFree86: setting up an XF86Config file.
</P>
<P>If you have XFree86 3.3.1 and your graphic card is listed in the
Hardware-HOWTO file, you should use the xf86config program to do your configuration. This
xf86config program is a comfortable and safe way to set up your system. If your graphics card is not listed, you have some
work ahead of you.
</P>
<H3><A NAME="ch10_ 4">
The XF86Config File
</A></H3>
<P>To be able to set up an XF86Config file, you need to read these files from
/usr/X11R6/lib/X11/doc: README, README.Config,
VideoModes.doc, and README.Linux. You also need to read the
man pages on the following topics: XF86Config,
XFree86, and the server you are using.
</P>
<P>The XF86Config file can be located in several places:
</P>
<UL>
<LI> /usr/X11R6/lib/X11. This is the standard location for the sample
XF86Config file, but in some cases you cannot use it (for example, a read-only
/usr partition).
<LI> /etc.
<LI> In your home directory.
<LI> As XF86Config.eg in /usr/X11R6/lib/X11.
</UL>
<P>The Linux filesystem standard places the
XF86Config file in /etc/X11. The XFree86 servers
will not "expect" an XF86Config file at this location, so there must be a link from one of the
places in the preceding list to /usr/X11R6/lib/X11. Find this link first and use it to access the
file. This way, you can be sure your changes take effect.
</P>
<P>To give you some hints, here is a list of what you need to set up the
XF86Config file correctly:
</P>
<UL>
<LI> The server suitable for your system. To get a hint as to which is the correct one,
run the SuperProbe program that comes with XFree86. It will identify your chipset,
and
</UL>
<A NAME="PAGENUM-177"><P>Page 177</P></A>
<UL>
<UL>
you can look at the XFree86HOWTO file on the CD-ROM at the back of this book to
see which server supports this chipset. Note that
SuperProbe can detect far more hardware than XFree86 supports.
</UL>
</UL>
<UL>
<LI> Your monitor's specifications, most importantly the maximum horizontal and
vertical scan frequency ranges and the bandwidth. This information can be obtained
from your monitor's datasheet.
<LI> The name of the chipset for your video card. For example, Tseng Labs,
ET3000, ET4000, and so on.
<LI> The available dot clocks for your card or (if supported) the name of the
programmable dot clock generator. Learn how to obtain these by reading the file
/usr/X11R6/lib/X11/doc/README.Config. Running
XF86Config sets your system's dot clocks.
<LI> "Mouse type" refers to the protocol the mouse is using, not to the manufacturer.
For example, a serial Microsoft mouse connected to the PS/2 port uses the PS/2
protocol, not the Microsoft protocol.
<LI> The type of device your mouse is connected to: serial or bus. (Usually you can use
/dev/mouse.)
<LI> Whether you want to use a national keyboard map or if you want to run the
generic U.S. key table.
</UL>
<TABLE BGCOLOR=#FFFF99><TR><TD><B>CAUTION</b></TD></TR><TR><TD><BLOCKQUOTE>
Do not share XF86Config files with people who do not have the same
configuration (graphics card and monitor). By sharing, you could fry your monitor.
<BR>
<BR>It isn't so hard to figure out modes for multisync monitors. Don't ever use a mode that
you haven't verified as being within your monitor's specs. Even if you have exactly the
same setup as the computer you're sharing the file with, check all modes before trying
them. There are many people who run their computers from specs that may not damage
their hardware but could damage yours.
</BLOCKQUOTE>
</TD></TR></TABLE>
<H3><A NAME="ch10_ 5">
Using Xconfigurator
</A></H3>
<P>Red Hat Linux comes with a utility called
Xconfigurator. This is a menu-driven tool that
will ask questions about your video card, monitor, and mouse, and then create an
XF86Config file for you. Xconfigurator will ask some fairly in-depth questions about your video card
and monitor. Gather up all your documentation about your machine's hardware before
running Xconfigurator.
</P>
<H3><A NAME="ch10_ 6">
Examining the XF86Config File
</A></H3>
<P>The XF86Config file contains all the configuration parameters for your X Window
installation. Space does not permit me to print the whole file. You will have to look in the directory
</P>
<A NAME="PAGENUM-178"><P>Page 178</P></A>
<P>/usr/lib/X11 for the XF86Config.eg file. Copy this
XF86Config.eg file to XF86Config. Then edit the
XF86Config file. The format of the XF86Config file consists of different sets that
are listed in the following sections:
</P>
<UL>
<LI> Files (file pathnames)
<LI> Font paths
<LI> Keyboard type
<LI> Pointer (including mouse type)
<LI> Server flags (miscellaneous server options)
<LI> Monitor (video modes)
<LI> Device
<LI> Screen
</UL>
<P>Each of these sections describes your hardware configuration, location of files, or both, to
the X server. Each section is enclosed by the words:
</P>
<!-- CODE SNIP //-->
<PRE>
Section "SectionName"
< information for the section >
EndSection
</PRE>
<!-- END CODE SNIP //-->
<H4><A NAME="ch10_ 7">
The File Pathnames
</A></H4>
<P>There is no reason to fiddle with the standard paths as provided in the sample
XF86Config file. In fact, any distribution that provides a different path structure should have edited this
section of the XF86Config.sample or the template
XF86Config file for xf86config. You do have to
know where these paths are pointing to in case of difficulties.
</P>
<P>Your XF86Config file should look similar to the lines from my
XF86Config file, as shown in
Listing 10.1.
</P>
<P>Listing 10.1. Font paths.
</P>
<!-- CODE //-->
<PRE>
#
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
#
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
# FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
</PRE>
<!-- END CODE //-->
<P>To see whether these lines are correct, look into each of the directories mentioned in
Listing 10.1 to see whether they have files in them. If these directories are empty, you do not have
the fonts installed, or they may be at another location.
</P>
<P><CENTER>
<a href="../ch09/0174-0174.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0179-0182.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?