400-403.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 105 行

HTML
105
字号
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:Installing and Configuring XFree86</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=22//-->

<!--PAGES=400-403//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="398-400.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="403-406.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading11"></A><FONT COLOR="#000077">Using ConfigFX86 and fx86config</FONT></H4>

<P><TT>ConfigFX86</TT> and <TT>fx86config</TT> use simple interfaces to let you select supported video cards and video monitors. If your video card is supported by the <TT>ConfigFX86</TT> or <TT>fx86config</TT> utility (check the Hardware HOWTO and XFree86 README files), you can use the <TT>ConfigFX86</TT> and <TT>fx86config</TT> installation routine to simplify the configuration process enormously. If it is provided with your XFree86 distribution, <TT>ConfigFX86</TT> and <TT>fx86config</TT> will be located in the directory <TT>/usr/X386/bin</TT>. <TT>ConfigFX86</TT> was written by Stephen Zwaska.</P>

<P>There is documentation available for <TT>ConfigFX86</TT> and <TT>fx86config</TT>, usually placed in <TT>/usr/X386/bin</TT> with the executable file. Some versions of Linux and XFree86 don&#146;t supply the documents, though. The documentation is often supplied in multiple formats. There is an ASCII version called <TT>ConfigFX86.txt</TT> and a PostScript version called <TT>ConfigFX86.ps</TT> (or the <TT>fx86config</TT> versions).</P>

<P>When you run either <TT>ConfigFX86</TT> or <TT>fx86config</TT>, you are shown some general information, then prompted for the information you gathered earlier about your system. In most cases, you are shown a list of supported values and asked to choose one. Following through these choices in order provides the utility with the proper information to build your <TT>Xconfig</TT> file.</P>

<P>The <TT>xf86config</TT> utility, for example, asks for your mouse type, whether you want to enable special features for the mouse (such as the middle button on a three-button mouse), the device the mouse is attached to, horizontal and vertical sync ranges of your monitor, a name for your monitor, the chipset used by your video card, the server to run, the location of the file linked to the server, the amount of RAM installed on your video card, whether you want a clockchip setting, and the resolutions the video card supports in order. After you have answered all the questions, <TT>xf86config</TT> asks whether the utility should create the <TT>XF86config</TT> file.</P>

<P>After the <TT>XF86Config</TT> or <TT>Xconfig</TT> file is created using the script, you should resist the temptation to start up X immediately. Instead, take the time to examine the file manually to prevent any chance of damage to your hardware from an incorrect setting. The following section on manually configuring the <TT>Xconfig</TT> or <TT>XF86Config</TT> file explains all the settings. After you&#146;re sure everything is fine, launch X with the command <TT>startx</TT>.</P>

<H3><A NAME="Heading12"></A><FONT COLOR="#000077">The Xconfig and XF86Config Files in Detail</FONT></H3>

<P>If you are manually entering your configuration information into the <TT>Xconfig</TT> or <TT>XF86Config</TT> files, you need to know how the files are laid out and how to enter your specific details. All versions of XFree86 have at least one sample configuration file, usually called <TT>Xconfig.eg</TT> or <TT>XF86Config.eg</TT> located in the <TT>lib</TT> directory. You should use this file as a template for creating your own configuration file. Copy the example file to a new file without the <TT>.eg</TT> extension and make the changes described as follows.</P>

<P>The <TT>Xconfig</TT> and <TT>XF86Config</TT> files are not short, but there are lots of comments scattered throughout. The format of the configuration files is a set of sections for each aspect of the XFree86 configuration. The general order of sections is as follows:</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;Pathnames to binaries and screen fonts

<DD><B>&#149;</B>&nbsp;&nbsp;Keyboard information

<DD><B>&#149;</B>&nbsp;&nbsp;Mouse information

<DD><B>&#149;</B>&nbsp;&nbsp;Server file

<DD><B>&#149;</B>&nbsp;&nbsp;Video information

</DL>

<P>Let&#146;s look at each section in a little more detail. If you have run the automated configuration file generator utilities such as <TT>xf86config</TT> or <TT>XF86Config</TT>, check the entries in the generated file. If you are manually editing the file, proceed slowly and methodically to prevent errors.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>Note:&nbsp;&nbsp;</B><BR>The code excerpts shown in the rest of this section are from the <TT>XF86Config</TT> file created by XFree86 version 3.X because it is the latest version and usually included with new software distributions. The <TT>Xconfig</TT> file for XFree86 version 2.X is similar and you should have no problem following the same procedures by examining the <TT>Xconfig</TT> file.<HR></FONT>

</BLOCKQUOTE>

<P>Notice that each section in the <TT>Xconfig</TT> or <TT>XF86Config</TT> file starts with the keyword &#147;section&#148; followed by the name of the section. The section is terminated with the keyword &#147;EndSection.&#148; This makes it easier to find the sections you want to work with. Comments in the file all start with a pound sign.</P>

<H4 ALIGN="LEFT"><A NAME="Heading13"></A><FONT COLOR="#000077">Pathnames</FONT></H4>

<P>In most cases, the pathnames provided in the configuration files do not need changing unless you installed XFree86 in a directory other than the default value. The paths used by XFree86 for screen fonts and other files are given in a section of the configuration file that looks like this:

</P>

<!-- CODE //-->

<PRE>

Section &#147;Files&#148;



# The location of the RGB database. Note, this is the name of the

# file minus the extension (like &#147;.txt&#148; or &#147;.db&#148;). There is normally

# no need to change the default.



    RgbPath   &#147;/usr/X11R6/lib/X11/rgb&#148;

# 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   &#147;/usr/X11R6/lib/X11/fonts/misc/&#148;

    FontPath   &#147;/usr/X11R6/lib/X11/fonts/Type1/&#148;

    FontPath   &#147;/usr/X11R6/lib/X11/fonts/Speedo/&#148;

    FontPath   &#147;/usr/X11R6/lib/X11/fonts/75dpi/&#148;

FontPath   &#147;/usr/X11R6/lib/X11/fonts/100dpi/&#148;



EndSection

</PRE>

<!-- END CODE //-->

<P>The preceding code defines the search paths for the screen fonts and RGB database. If you installed XFree86 into the default directories or let the installation routines proceed with default values, you should not have to change anything here.

</P>

<P>Note that the directories referenced in this <TT>XF86Config</TT> file follow the formal naming conventions for X, using <TT>/usr/X11R6</TT>. However, because these are linked to <TT>/usr/X11</TT>, <TT>/usr/X386</TT>, and potentially other directories in most installations, the link can be followed to the target file. Make sure to verify that the directories actually do point to the screen fonts by going into each directory in turn and examining the files they contain. If the directory doesn&#146;t exist or is empty, XFree86 won&#146;t be able to load the fonts properly and will crash or generate error messages.</P>

<P>If you add new fonts to your XFree86 installation, they should go in one of the font directories specified in the <TT>XF86Config</TT> file.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="398-400.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="403-406.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?