394-396.html

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

HTML
94
字号
<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=394-396//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="392-394.html">Previous</A></TD>

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

<TD><A HREF="396-398.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">Installing XFree86 Manually</FONT></H4>

<P>As mentioned earlier in this section, you can install XFree86 without using the installation scripts. In some cases, you will want to do this if you have to perform installation across directories or place the files in directories other than their default values. Some users like to manually install XFree86 so they know what is happening at each step: It&#146;s a great way to learn the intricacies of the X operating system (although it can be a long operation).

</P>

<P>To manually install the XFree86 distribution software, you must extract the files into the proper directories using the <TT>gzip</TT> command. The general process is quite simple:</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;Log in as <TT>root</TT>. You must install XFree86 as the superuser.

<DD><B>&#149;</B>&nbsp;&nbsp;Create the directory <TT>/usr/X386</TT>. This directory may already exist on your system because it is created by some Linux installation scripts.

<DD><B>&#149;</B>&nbsp;&nbsp;Change to the <TT>/usr/X386</TT> directory.

<DD><B>&#149;</B>&nbsp;&nbsp;For each file in the distribution set, use the <TT>gzip</TT> utility to extract and install the contents. The general format of the command follows:

<!-- CODE SNIP //-->

<PRE>

qzip -dc tarfile | tar xvof -

</PRE>

<!-- END CODE SNIP //-->

<DD><B>&#149;</B>&nbsp;&nbsp;Repeat the process for each file in the XFree86 product set. You will have to change to each distribution directory manually (on a CD-ROM or different disk, for example), and use <TT>gzip</TT> on each archive file in that directory.

</DL>

<P>The <TT>tar</TT> utility flags shown in the preceding command line ensure that the original ownership of the files is preserved and that the output is displayed on the screen for you. After all the XFree86 files have been installed into the correct directories, you can continue with the configuration process.</P>

<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">Installing XFree86 Using a Script</FONT></H4>

<P>Most users want to automate the installation process. It is faster, requires less interaction from the user, and is much less prone to errors. For this reason, most XFree86 distribution releases either include an installation script or use the Linux setup program.

</P>

<P>When installing using the Linux setup script (or similar utility) supplied with Linux distributions, you are usually prompted as to whether you want to install XFree86 during the initial Linux installation. If you answered affirmatively to this question, the binaries for XFree86 will already be installed. If you didn&#146;t get prompted for XFree86 installation, it may have been installed automatically. Check the directories <TT>/usr/X386/bin</TT> or <TT>/usr/X11R6/bin</TT> for files. If there are a large number of files in either directory, XFree86 was installed for you.</P>

<P>Just because XFree86 was installed from the distribution media automatically doesn&#146;t mean you can use it immediately. You should still go through the configuration process by using the <TT>ConfigFX86</TT> or <TT>fx86config</TT> utilities or manually edit the <TT>Xconfig</TT> or <TT>XF86Config</TT> file (depending on the version of XFree86). Most automated installations include default VGA or SVGA preconfigured files, but it&#146;s still a good idea to check the contents of the <TT>Xconfig</TT> or <TT>XF86Config</TT> file before you try to run XFree86.</P>

<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">Path Environment Variable</FONT></H4>

<P>It is important to put the XFree86 binary directory in your path, controlled by an environment variable PATH or path (depending on the shell). The location of the variable&#146;s definition depends on the type of shell you are using, and the login you generally use to run XFree86. In general, you should simply add either <TT>/usr/X386/bin</TT> (XFree86 version 2.X) or <TT>/usr/X11R6/bin</TT> (XFree86 version 3.X) to the path definition statement.</P>

<P>For example, if you use <TT>bash</TT> for most purposes, a <TT>.profile</TT> file is read when you log in to set environment variables. If you log in as a user other than <TT>root</TT>, the .profile file is kept in your home directory. If you use the <TT>root</TT> login, the <TT>.profile</TT> may be kept in the root directory or you may be using the default system <TT>.profile</TT> kept in the file <TT>/etc/profile</TT> (note the lack of a period when the file is in <TT>/etc</TT>: This is a convention used to show it is a globally available <TT>.profile</TT>).</P>

<P>If it isn&#146;t already in the path, add the XFree86 bin directory to the path or PATH variable definition. A <TT>.profile</TT> file for <TT>bash</TT> may have the following line after adding the XFree86 directory:</P>

<!-- CODE SNIP //-->

<PRE>

PATH=&#147;/sbin:/usr/bin:/bin:/usr/X11/bin:/usr/openwin/bin&#148;

</PRE>

<!-- END CODE SNIP //-->

<P>For C shell users (including <TT>tcsh</TT>) other than <TT>root</TT>, the syntax is a little different. The startup file <TT>.login</TT> or <TT>csh.login</TT> contains a line defining the path. Adding the XFree86 directory is a matter of tacking it in to the definition:</P>

<!-- CODE SNIP //-->

<PRE>

set path = ( /sbin /usr/bin /bin /usr/X11/bin /usr/openwin/bin . )

</PRE>

<!-- END CODE SNIP //-->

<P>Of course, your exact path definition lines will probably differ, but as long as you add the XFree86 bin directory to the path, then log out and back in, the binaries should be found properly by the shell.

</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="392-394.html">Previous</A></TD>

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

<TD><A HREF="396-398.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





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

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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