📄 ch21.htm
字号:
<TD ALIGN="LEFT">Mach32 accelerated server </TD>
<TD ALIGN="LEFT">XF86_Mach32 </TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD ALIGN="LEFT">Mach32 accelerated server </TD>
<TD ALIGN="LEFT">XF86 Mach64 </TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD ALIGN="LEFT">AGX Support </TD>
<TD ALIGN="LEFT">XF86_AGX </TD>
</TR>
<TR ALIGN="LEFT" rowspan="1">
<TD ALIGN="LEFT">P9000 chipset </TD>
<TD ALIGN="LEFT">XF86_P9000 </TD>
</TR>
</TABLE>
</CENTER>
<P><BR>
The <TT>setup</TT> procedure is simple. Choose the SOURCE and TARGET disks, and answer
all the questions you are asked. The only caveat to this procedure is that you must
answer OK for the X server you want and Cancel for all others. If you answer OK to
more than one X server installation query, the last one you answered OK to will be
the default server! The problem is easy to fix. After the installation is over, go
to <TT>/usr/bin/X11</TT> and create a link from the file X to the server of your
choice. I chose to copy <TT>XF86_SVGA</TT> onto X, just because I had disk space
to spare:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF"># cd /usr/bin/X11
# cp XF86_SVGA X
</FONT></PRE>
<DL>
<DT><FONT COLOR="#0066FF"></FONT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading11<FONT COLOR="#000077"><B>TIP:</B> </FONT>It's a good idea
to install all the available fonts that you can when you are installing X. I installed
only a few when I first installed X and had to re-install newer ones for some other
X and Motif applications that I got later from the Net. Don't do what I did; save
yourself some time by installing the fonts now.
<HR>
</DL>
<P>Now for the hard way. The manual procedure is a bit more involved, and you are
liable to make mistakes. It also requires tremendous attention to detail, but it
gives you more control over every step. The manual procedure lets you stop and repeat
steps instead of going through the complete installation process as in the menu-driven
option.</P>
<P>To install the binary distribution manually, perform the following steps:
<DL>
<DD><B>1. </B>Log in as root, or become root if you already are logged in.<BR>
<B><BR>
2.</B> Copy all the release's tar files to floppies or the hard drive, or know their
location on the CD-ROM. If the CD-ROM or hard drive is not mounted, mount it now
and ensure that you can get to the files from within Linux.<BR>
<B><BR>
3. </B>Create the directory <TT>/usr/X11R6</TT> (don't worry if it's already there).<BR>
<B><BR>
4.</B> Change your current working directory to <TT>/usr/X11R6</TT> (<TT>cd /usr/X11R6</TT>).<BR>
<B><BR>
5. </B>Change permissions to make sure that all the files are writable.<BR>
<B><BR>
6. </B>Run the following command on each <TT>*.tgz</TT> file in each of the <TT>x1</TT>
to <TT>x21</TT>, <TT>xd1</TT> to <TT>xd4</TT>, and <TT>xap1</TT> to <TT>xap4</TT>
directories on the CD-ROM to unzip and install its contents:<FONT COLOR="#0066FF"></FONT>
</DL>
<PRE><FONT COLOR="#0066FF">gzip -rc tarfilename | tar xvof -
</FONT></PRE>
<P>The flag (<TT>-r</TT>) for the <TT>gzip</TT> command tells it to recursively create
all names and paths for the files in the tar file. The <TT>-c</TT> option sends the
contents to the standard output, from where it will be piped to the <TT>tar</TT>
command. The flags for the <TT>tar</TT> command tell tar to extract (<TT>x</TT>),
being verbose (<TT>v</TT>), all files while preserving original ownership (<TT>o</TT>)
from the file (<TT>f</TT>) designated by the standard input (<TT>-</TT>).</P>
<P>Repeat this step for all the tar files you have in your distribution. Go in sequence
for all the disks--do not skip sequences.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading12<FONT COLOR="#000077"><B>CAUTION:</B> </FONT>This last step
overwrites all files from an older XFree86 version. This step does not affect the
<TT>XF86Config</TT> file, but the <TT>XF86Config.eg</TT> file is overwritten. Most
files in the distribution set are overwritten. I repeat: Before installing XFree86,
back up every file you changed.
<HR>
</DL>
<P>After you finish installing XFree86, you have to configure it to match your system.
Be sure to use the setup procedure before you attempt this tar procedure--you will
save time and effort even if you don't completely control the installation process.
<CENTER>
<H3><A NAME="Heading13<FONT COLOR="#000077">Setting Up Your XFree86 System</FONT></H3>
</CENTER>
<P>This section covers another one of the more difficult, time-consuming, and frustrating
parts of installing XFree86: setting up an XF86Config file.</P>
<P>The full setup procedure is detailed in the file at <TT>http://www.xfree86.org/3.2/QuickStart-2.html</TT>.
The <TT>QuickStart-2.html</TT> file lists the procedures of using three utilities,
<TT>XF86Setup</TT>, <TT>xf86config</TT>, and <TT>xvidtune</TT>, that are available
from <TT>www.xfree86.org</TT>. The exhaustive descriptions will get you started right
away if you want to use a menu-driven option. The <TT>XF86Setup</TT> program provides
a text mode to allow manual edits of the configuration files as well.</P>
<P>These utilities are not on the CD-ROM at the back of this book. The information
in this chapter will deal with a manual procedure that gets you the same results.
It's nice to know what those scripts do, after all!</P>
<P>Generally, you can use the default files that come with XFree86. Log in as root
or change to root. Then go to the <TT>/usr/lib/x11</TT> directory. Copy <TT>XF86Config.eg</TT>
onto the <TT>XF86Config</TT> file. You might want to read the file and familiarize
yourself with its contents. We will cover customizing this file in the section "The
<TT>XF86Config</TT> File" in Chapter 22, "Configuring XFree86." For
the moment, you can live with the defaults.</P>
<P>One final check you should do is to follow the link of <TT>/usr/lib/X11/X</TT>
to the correct server. If you have an SVGA card, this link should be set, via an
intermediate link if any, to <TT>/usr/bin/X11/XF86_SVGA</TT>. If the link does not
point to the right server, make it point to the correct server in <TT>/usr/bin/X11</TT>.
You can copy it too, if you want. For example, the X server on my machine (<TT>X</TT>)
is simply a copy of <TT>XF86_SVGA</TT>.
<CENTER>
<H3><A NAME="Heading14<FONT COLOR="#000077">Running XFree86</FONT></H3>
</CENTER>
<P>At this point, you should be able to type <TT>xinit</TT> at the prompt and have
X Window on your monitor. Actually, you have two options in starting X: use the <TT>xinit</TT>
program or use the <TT>startx</TT> shell script. The advantage to using the xinit
program is that you can easily start X Window. The advantage to the <TT>startx</TT>
script is that you can modify the way in which the environment variables are treated
in bringing up X. With <TT>xinit</TT>, you are stuck with the defaults. In most cases,
the defaults are what you want anyway. The <TT>xinit</TT> program executes statements
in the order in which they are found in the <TT>.xinitrc</TT> file.</P>
<P>You can log all the messages that zip by your text screen in a log file with this
command in the <TT>bash</TT> shell:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">$ startx 2>&1 > Xstartup.log
</FONT></PRE>
<P>This command does not work in the C or <TT>tcsh</TT> shells. You have to use the
following command instead:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">% startx >& Xstartup.log
</FONT></PRE>
<P>This command gets a log file of the X startup by redirecting all output from <TT>stdout</TT>
and <TT>stderr</TT> to a log file, <TT>Xstartup.log</TT>. If you encounter problems,
the information in this file will help you determine what happened.</P>
<P>If you encounter any problems, look at the XFree86 documentation files in <TT>/usr/X386/lib/X11/doc</TT>.
These files provide a lot of information on what to do if problems occur. For more
information, also look in the FAQs that are mentioned in those files. You can also
find a very detailed set of troubleshooting documents at the following URL:</P>
<P><TT>http://www.xfree86.org/3.2/QuickStart-7.html</TT></P>
<P>After you are in the environment of the window manager you chose in the <TT>.xinitrc</TT>
file, you must conform X Window System's way of moving around. See the next few chapters
to learn how to work with windows with three window managers: <TT>mwm</TT>, <TT>olwm</TT>,
and <TT>fvwm</TT>.</P>
<P>Here's my simple <TT>.xinitrc</TT> file, which starts two xterminals and the fvwm
window manager:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">$ cat .xinitrc
xterm -name console &
xterm -name work &
fvwm
</FONT></PRE>
<CENTER>
<H4><A NAME="Heading15<FONT COLOR="#000077">Stopping X</FONT></H4>
</CENTER>
<P>Note that all but the last command in the <TT>.xinitrc</TT> file are run in the
background. It's important to run all but the last command in the background. When
the last command terminates, so does your X session. Xterms can come and go, but
because having a window manager is critical to working with X, killing the window
manager equates to killing your X session. It's natural to place the window manager
command as the last command in <TT>.xinitrc</TT>.</P>
<P>To stop X and get back to the text-based console, you have to stop the last application
that was in the <TT>.xinitrc</TT> file. This last application could be the window
manager, an xterm, or just about any application. When you quit X Window by stopping
this application, you return to your character- or text-based terminal.</P>
<P>Another way to kill the window manager (and X) is to use the Ctrl-Alt-backspace
combination. This is not the preferred way of doing things, however. A more graceful
way is to have the window manager be the last program started in the <TT>.xinitrc</TT>
file, and exit from it to stop X and get back to the console.</P>
<P>If you simply want a login shell, you can use a virtual terminal instead of stopping
X altogether. Press the Ctrl-Alt-F1 keys to get the first virtual terminal. (This
brings up the console.) Pressing the Ctrl-Alt-F2 keys brings up the second virtual
terminal, and so on. Up to six such virtual terminals were available on my Linux
machine. That is, from F1 to F6 gave me six virtual terminals. You might have more
or fewer than I had. To get back to X, use the Ctrl-Alt-F7 key.
<CENTER>
<H4><A NAME="Heading16<FONT COLOR="#000077">X Applications Packages</FONT></H4>
</CENTER>
<P>Several packages are related to X. The rest of the packages exist in the <TT>/usr/bin/X11</TT>
directory. There are calendars, clocks, bitmap editors, and so on. One of these X
application programs you should be aware of is the <TT>xsetroot</TT> program. With
<TT>xsetroot</TT>, you can set the foreground and background colors, the shape of
cursors, the background image, and more. The man pages on <TT>xsetroot</TT> provide
many examples and good documentation.</P>
<P>I list the following window managers explicitly because they have a great influence
on the look and feel of X on your display:
<UL>
<LI>XView
</UL>
<DL>
<DD>This package is included on the CD-ROM as part of the Slackware distribution.
If you are installing from another source, you might want to read the next few paragraphs;
otherwise, skip to the next item.<BR>
This package is a port to Linux of Sun's XView3.2 package by Kenneth Osterberg. It
includes the XView toolkit, a set of extensions to X. The package gives you the look
and feel of the OPEN LOOK extension to X (many recognize that from OpenWindows from
Sun). You can get it in the <TT>/pub/Linux/libs/X</TT> directory on sunsite or in
the <TT>/pub/linux/binaries/usr.bin.X11</TT> directory on <TT>tsx-11</TT>.<BR>
To install XView, you have log in as root. Then untar the tar file in any directory
(<TT>/usr/src</TT>, for example), read the documentation that comes with it (especially
the <TT>README</TT>), and run the <TT>INSTALL</TT> script. Note that you need about
25MB of free disk space to install XView completely (with examples). Some files are
duplicated on this distribution. After running the <TT>INSTALL</TT> script and removing
the original tarred files, you still need about 11MB. This would include all examples,
which take about 2MB of disk space, along with 2.5MB for development libraries and
files. If you do not want to compile any XView programs, you can spare this 4.5MB
by removing the static (<TT>*.a</TT>) and stub (<TT>*.sa</TT>) libraries, as well
as the examples. To run XView, you need at least 8MB of RAM, or even better, 16MB.
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading17<FONT COLOR="#000077"><B>TIP:</B> </FONT>Do not remove any
shared (<TT>*.so</TT>) libraries while pruning the XView tree! Other applications
might need these libraries in the future.
<HR>
</DL>
<UL>
<LI>Motif
</UL>
<DL>
<DD>This is commercial software, so you will have to pay for it. You can find an
advertisement from Metrolink (a company that provides a port to Linux) on <TT>tsx-11:/pub/linux/advertisements</TT>.
The Web site for Metrolink is at <TT>http://www.metro-link.com</TT>. Companies other
than Metrolink also sell Motif; every now and then, advertisements appear in the
newsgroup <TT>comp.os.linux.announce</TT>.
</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -