📄 rhl23.htm
字号:
<P>SWiM $149.95 (US)
</UL></UL>
<UL>
<UL>
<P>ACC Bookstore
</UL></UL>
<UL>
<UL>
<P>136 Riverside
</UL></UL>
<UL>
<UL>
<P>Westport, CT 06880
</UL></UL>
<UL>
<UL>
<P>(800) 546-7274
<BR>
</UL></UL>
<UL>
<UL>
<BR>
<PRE>
<FONT COLOR="#000080"><A HREF="mailto:orders@acc.corp.com">orders@acc.corp.com</A></FONT></PRE></UL></UL>
<UL>
<UL>
<P>MOO-TIFF
</UL></UL>
<UL>
<UL>
<P>InfoMagic
</UL></UL>
<UL>
<UL>
<P>11950 N. Highway 89
</UL></UL>
<UL>
<UL>
<P>Flagstaff, AZ 86004
</UL></UL>
<UL>
<UL>
<P>(520) 526-9565
<BR>
</UL></UL>
<UL>
<UL>
<BR>
<PRE>
<FONT COLOR="#000080"><A HREF="mailto:orders@infomagic.com">orders@infomagic.com</A></FONT></PRE></UL></UL>
<BR>
<A NAME="E68E167"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>General Installation Procedures</B></FONT></CENTER></H3>
<BR>
<P>Each Motif distribution has its own distinct installation procedure. The documentation provided by each vendor should give you enough to get started. By reading about one vendor's installation procedure, you can get an idea of how other distributions
are installed. For this description, I use the MetroLink installation guidelines. Other distributions may follow a different installation procedure, but you will know what to look for when you are done with the installation.
<BR>
<P>General software requirements for Motif include the following:
<BR>
<UL>
<LI>XFree86 2.1 or later
<BR>
<BR>
<LI>C library version of libc 4.4.4 or later
<BR>
<BR>
<LI>ld.so runtime linker/loader
<BR>
<BR>
</UL>
<P>The Motif version on the CD-ROM at the back of the book satisfies these requirements for you. However, if you have installed from another source, you should confirm that you meet these requirements before installing Motif.
<BR>
<P>You must do all the installation as root. Be sure that you are root before proceeding.
<BR>
<P>Motif requires the following directories to exist in the X11 installation on your machine.
<BR>
<PRE>
<FONT COLOR="#000080">/usr/lib/X11
/usr/bin/X11
/usr/include/X11</FONT></PRE>
<P>If these directories do not exist, you must create links to them from where equivalent XFree86 directories are kept. The XFree86 distributions are kept in the following directories:
<BR>
<PRE>
<FONT COLOR="#000080">/usr/X11R6/lib/X11
/usr/X11R6/bin/X11
/usr/X11R6/include/X11</FONT></PRE>
<P>In some cases, the installation program creates the required links to these directories for you. However, if you do not see these directories, you can create them with the following steps:
<BR>
<PRE>
<FONT COLOR="#000080"># ln -s /usr/X11R6/lib/X11 /usr/lib/X11
# ln -s /usr/X11R6/bin/X11 /usr/bin/X11
# ln -s /usr/X11R6/include/X11 /usr/include/X11</FONT></PRE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Check to see whether you have /lib/libXm.so.1 or /lib/libXm.so.1.2.2 installed on your machine. Remove these files before proceeding.
<BR>Also check and remove, if present, the directory (and its contents) /usr/lib/X11/Motif before you start the installation process. This way you will avoid keeping old files around.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>The MetroLink distribution consists of five 3.5-inch, high-density disks. They are labeled as follows:
<BR>
<UL>
<LI>Runtime 1 and 2
<BR>
<BR>
<LI>Developers Disk 1, 2, and 3.
<BR>
<BR>
</UL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The floppy disks on Linux are addressed by a syntax that describes how to read and write them. For example, a 3.5-inch, high-density floppy disk in drive A is addressed as /dev/fd0H1440. For a 5.25-inch, high-density disk in drive B, you have to use
/dev/fd1H1200. (The fd0 implies the fast floppy disk as a high-density, 3.5-inch, 1.44MB floppy disk drive. For a 5.25-inch, high-density drive as the second drive you would use /dev/fd1H1200.)
<BR>Most Motif distributions come on 3.5-inch, high-density floppy disks, so you should use /dev/fd0H1440 or /dev/fd1H1440 for drive A and B, respectively.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Now insert the first Runtime disk into your floppy drive, and issue the following commands if you are using drive A.
<BR>
<PRE>
<FONT COLOR="#000080"># cd /tmp
# cpio —extract —verbose —block-size=32 -I /dev/fd0H1440</FONT></PRE>
<P>The cpio program prompts you for the second disk. Replace the disk and press the Enter key to continue.
<BR>
<P>After cpio is finished with the extraction, you have a large file in the tmp directory. This file is called run.tar.z. Now, you have to extract all the files from file into your directory tree. Issue the following commands:
<BR>
<PRE>
<FONT COLOR="#000080"># cd /
# gzip -dc /tmp/run.tar.z | tar -xvf -</FONT></PRE>
<P>The gzip -dc command extracts all files in the compressed archive and passes the resulting tar file to the tar program. This tar program extracts (x) all the files it receives on its standard input (-), and lets you know what it's doing by being verbose
(v) while extracting each file.
<BR>
<P>Now, remove the temporary file with the following command:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080"># rm /tmp/run.tar.z</FONT></PRE>
<P>Do the same procedure for the developers disks. Use cpio to copy the dev.tar.z file into the tmp directory. The use the gzip command as before for the runtime libraries, except use the name dev.tar.z instead of run.tar.z.
<BR>
<BR>
<A NAME="E68E168"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Getting Started with X Window</B></FONT></CENTER></H3>
<BR>
<P>On some systems, you may have to start X from the command line after you log in. On other systems, you may have to interface through the xdm client. Let's start with the easy case of the xdm manager already running on your system.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The first thing to remember is that X is very flexible. You can customize almost anything in X. Therefore, be warned that even though I attempt to describe the most common features of X, they may not work exactly as described. This is the price of
flexibility. This is especially true for all the different versions of X and window managers offered in X.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BR>
<A NAME="E68E169"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Starting X and </B><B>mwm</B></FONT></CENTER></H3>
<BR>
<P>If you do not see any windows at all, and you do not see a cursor, you do not have the X server running. In this case, you have to start X yourself.
<BR>
<P>There are several steps to take before you start X.
<BR>
<OL>
<LI>Confirm that startx exists in your PATH. Use the echo $PATH command to see whether /usr/X11R6/bin is in your path.
<BR>A sample startx is shown in Listing 23.1.
<BR>
<BR>
<LI>Look for a file called XF86Config in /usr/X11R6/lib/X11. This file contains very hardware-specific information about your system. Read Chapters 21 and 22 to ensure that you have installed X correctly.
<BR>
<BR>
<LI>Type the command startx at your prompt.
<BR>
<BR>
<LI>Wait a few seconds (or minutes, depending on your hardware). You should see several messages whisk by, and the screen should change to that of a session without a window manager.
<BR>
<BR>
<LI>At this point, you can run a crippled windowing system without a window manager, or you can start a window manager. For example, to get the Motif Window Manager, use the following command in an xterm. (Of course, you can use fvwm, or whatever manager
you fancy and have installed.)
<BR>mwm &
<BR>
</OL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Always make a copy of XF86Config and save it away before you modify it. Do not edit this file while you are already in X.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>
<FONT COLOR="#000080"><B>Listing 23.1. A sample </B><B>startx</B><B> file.</B></FONT>
<BR>
<PRE>
<FONT COLOR="#000080">$ less /usr/X11R6/bin/startx
#!/bin/sh
# $Xconsortium: startx.cpp,v 1.4 91/108/22 11:41:29 rws Exp $
# $Xfree86: xc/programs/xinit/startx.cpp,v 3.0 1994/05/22 00:02:28 dawes Exp $
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit. It looks for user .xinitrc and .xerverrc
# files, then system xinitrc should probably do things like check
# for .Xresources file and merge them in, startup in a window manager,
# and pop a clock and serveral xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.
#
userclientrc=$HOME/.xinitrc
userserverrc=$HOME/.xserverrc
sysclientrc=/usr/X11R6/lib/X11/xinit/xinitrc
sysserverrc=/usr/X11R6/lib/X11/xinit/xserverrc
clientargs=""
serverargs=""
if [ -f $userclientrc ]; then
clientargs=$userclientrc
else if [ -f $sysclientrc]; then
clientargs=$sysclientc
fi
fi
if [ -f $userserverrc ]; then
serverargs=$userserverrc
else if [ if $sysserverrc ]; then
serverargs=$sysserverrcfifiwhoseargs="client"
while [ "x$1" != "x" ]; do
case "$1" in
/''*|\.*) if [ "$whoseargs" = "client" ]; then
clientargs="$1"
else
serverargs="$1"
fi ;;
—) whoseargs="server" ;;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -