📄 437-438.html
字号:
<HTML>
<HEAD>
<TITLE>Special Edition Using Linux, Fourth Edition:Installing the X Windows System</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=0789717468//-->
<!--TITLE=Special Edition Using Linux, Fourth Edition//-->
<!--AUTHOR=Jack Tackett//-->
<!--AUTHOR=Jr.//-->
<!--AUTHOR=Steve Burnett//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Que//-->
<!--CHAPTER=21//-->
<!--PAGES=437-438//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="434-436.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch22/439-441.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>X starts up at the position specified by the <TT>ViewPort</TT> value. A value of <TT>0,0</TT> tells X to start with position 0,0 in the upper-left corner of the display.</P>
<P>With the <TT>Virtual</TT> value, you can define a virtual screen that’s larger than your physical screen. If you specify a larger screen, X will automatically scroll the screen as needed when you move the pointer to positions outside the range of your physical screen.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>TIP: </B>Many programs found on the Internet assume a three-button mouse and a screen size of 1152×900. This screen size is a typical screen size found on a Sun workstation. So to emulate such a system, you would need to specify the <TT>Emulate3Buttons</TT> in the <TT>Pointer</TT> section and a <TT>Virtual 1152 900</TT> in a <TT>Display</TT> subsection of the <TT>Screen</TT> section.<HR></FONT>
</BLOCKQUOTE>
<H4 ALIGN="LEFT"><A NAME="Heading14"></A><FONT COLOR="#000077">Running the <I>xf86Config</I> Program
</FONT></H4>
<P>After running SuperProbe and building a basic XF86Config file, you then can run the <TT>xf86Config</TT> program to generate a config file for your system. First, make sure that you aren’t in the /usr/X11R6/lib/X11 directory, because this is where X looks for the XF86Config file first, and you don’t want to overwrite the file you just created. To run the <TT>xf86Config</TT> program, issue the following command:</P>
<!-- CODE SNIP //-->
<PRE>
/usr/X11R6/bin/xf86Config
</PRE>
<!-- END CODE SNIP //-->
<P>The <TT>xf86Config</TT> program asks many questions about your system, which it uses to fill in the various sections of the XF86Config file. After the program finishes, you must check to make sure that the values are similar to the ones you collected while creating your version of the file. The only items you’ll need help with are the clock values for your monitor. You can get X itself to help with those values.</P>
<H4 ALIGN="LEFT"><A NAME="Heading15"></A><FONT COLOR="#000077">Running X in <I>-probeonly</I> Mode
</FONT></H4>
<P>By running X in a special mode, the program generates a file with information about your entire system. You can use the information in this file to complete your XF86Config file. To run X in the special probe-only mode, simply enter this command:
</P>
<!-- CODE SNIP //-->
<PRE>
<B>X -probeonly > /tmp/x.value 2>&1</B>
</PRE>
<!-- END CODE SNIP //-->
<P>The command redirects the output of X into a file named /tmp/x.value. This is an ASCII file you can edit with any ASCII editor, such as <TT>vi</TT>. You can cut the clock information from this file and paste the information into your XF86Config file, thus completing your configuration file for X.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR>• <B>See</B> “Copying, Cutting, and Pasting,” <B>p. 197</B><HR></FONT>
</BLOCKQUOTE>
<P>Now copy the file you’ve created into one of the directories XFree86 looks through. More than likely, you can copy the file with this command:
</P>
<!-- CODE SNIP //-->
<PRE>
cp XF86Config /usr/X11R6/lib/X11/
</PRE>
<!-- END CODE SNIP //-->
<P>You’re now ready to start up your X server with the <TT>startx</TT> command.</P>
<H3><A NAME="Heading16"></A><FONT COLOR="#000077">Using the X Windows Resource Files</FONT></H3>
<P>To operate and use X, you need at least a startup file named .xinitrcm, which provides default settings used by X when running. To override the defaults, you can use a personal file named .Xresources that you place in your home directory. Linux provides a default .xinitrc in /etc/X11/xinit/xinitrc, although you may find the file in /usr/lib/X11/xinit/xinitrc. See the man pages for <TT>startx</TT> and <TT>xrdb</TT> for more information on these files.</P>
<H3><A NAME="Heading17"></A><FONT COLOR="#000077">From Here…</FONT></H3>
<P>In this chapter, you learned about the XFree86 implementation of the X Windows XR11R6 standard. You’ve seen the difference between client and server applications and how they vary from other PC-based client/server applications. The following chapters provide more information:
</P>
<DL>
<DD><B>•</B> Chapter 3, “Installing Red Hat,” explains how to install the Red Hat Linux distribution, which installs X Windows as part of the installation process.
<DD><B>•</B> Chapter 6, “Upgrading and Installing Software with RPM,” shows you how to use the <TT>pkgtool</TT> program to install new software systems onto your Linux box. This program is useful for installing X if you didn’t install it with the base Linux system.
<DD><B>•</B> Chapter 8, “Using the <TT>vi</TT> Editor,” shows you how to use <TT>vi</TT>. You need to edit your X configuration file, XF86Config, to provide X with the proper information to run on your specific hardware. <TT>vi</TT> is the perfect editor to use for editing the various files needed by X.
<DD><B>•</B> Chapter 21, “Installing the X Windows System,” explains how to install the XFree86 version of X for Linux, which you need to do before installing X Windows.
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="434-436.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch22/439-441.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -