⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rhl56.htm

📁 linux的初学电子书
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<A NAME="E69E545"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Inline Images</B></FONT></CENTER></H4>

<BR>

<P>Mosaic can display images inside documents, making it a highly visual medium for your information. However, each image requires processing time, which slows down the initial display of the document. Using a particular image multiple times in a document 
causes very little performance degradation compared to using the image only once.

<BR>

<P>An image is sized before it is included in a document. Images can fill a screen. Or, they can be small images that save time when Mosaic displays the document, but are still large enough to present information and be a teaser for the larger image 
displayed in a separate window.

<BR>

<P>An image tag is coded into the source file to tell Mosaic that an image is to be displayed. The image tag is an HTML extension, first implemented in Mosaic. You can test your Web pages by loading this file locally to see how it looks. You don't 
necessarily have to be connected to the Internet to do this.

<BR>

<BR>

<A NAME="E69E546"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Where To Get More Help on HTML</B></FONT></CENTER></H4>

<BR>

<P>When you have Mosaic, you have access to online help for writing your own HTML documents. To get The Beginner's Guide to HTML select On HTML... from the help menu. You have to be on the Internet for this to work, because Mosaic accesses the Web to get 
the latest copy for you. This file provides up-to-date information in far greater detail than what you are reading right now. You should print this guide out for future reference. See also Teach Yourself Web Publishing with HTML in 14 Days (Sams 
Publishing).

<BR>

<BR>

<A NAME="E68E432"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Netscape</B></FONT></CENTER></H3>

<BR>

<P>The authors of the first NCSA Mosaic have formed their own company called Netscape Communications. Their new brainchild is called Netscape, and you can get a Linux version of it for yourself.

<BR>

<P>The format for using Netscape is very similar to that of Motif. You can use URLs to type your destination name or use the point-and-click method to navigate HTML documents.

<BR>

<P>The options buttons include the ability to turn on and off the button bar, URL locator, and the bottom status bars. This way, you can customize your screens to suit your preferences. A sample of the preferences file is shown in Listing 56.1.

<BR>

<P>

<FONT COLOR="#000080"><B>Listing 56.1. A sample Netscape preferences file.</B></FONT>

<BR>

<PRE>

<FONT COLOR="#000080"># Netscape Preferences File

# Version: 1.1N

# This is a generated file! Do not edit.

SHOW_TOOLBAR: True

SHOW_URL: True

SHOW_DIRECTORY_BUTTONS: False

AUTOLOAD_IMAGES: True

FTP_FILE_INFO: True

SHOW_SECURITY_BAR: False

TOOLBAR_ICONS: False

TOOLBAR_TEXT: True

HOME_DOCUMENT: http://www.ikra.com/

FONT_SIZE: 2

UNDERLINE_LINKS: True

HISTORY_FILE: /home/khusain/.netscape-history

HISTORY_EXPIRATION: 30

BOOKMARKS_FILE: /home/khusain/.netscape-bookmarks.html

TMPDIR: /tmp

TN3270: xterm -e tn3270 %h

TELNET: xterm -e telnet %h %p

RLOGIN: xterm -e rlogin %h

RLOGIN_USER: xterm -e rlogin %h -l %u

NNTPSERVER: news

NEWSRC_DIR: /home/khusain

NEWS_MAX_ARTICLES: 100

REAL_NAME: Jonathan Doe Husain

EMAIL_ADDRESS: khusain@ikra.com

ORGANIZATION: Hardly any mps inc.

SIGNATURE_FILE: /home/khusain/.signature

SIGNATURE_DATE: 0

8BIT_MAIL_AND_NEWS: True

MAILHOST: localhost

SOCKS_HOST:

FTP_PROXY:

HTTP_PROXY:

HTTPS_PROXY:

GOPHER_PROXY:

WAIS_PROXY:

NO_PROXY:

MEMORY_CACHE_SIZE: 2000

DISK_CACHE_SIZE: 5000

SOCKET_BUFFER_SIZE: 32

MAX_CONNECTIONS: 4

CACHE_DIR: /home/khusain/.netscape-cache

LICENSE_ACCEPTED: 501 1.1N

DITHER_IMAGES: True

STREAMING_IMAGES: True

VERIFY_DOCUMENTS: 0

MIME_TYPES: /usr/local/lib/netscape/mime.types

PERSONAL_MIME_TYPES: /home/khusain/.mime.types

MAILCAP: /usr/local/lib/netscape/mailcap

PERSONAL_MAILCAP: /home/khusain/.mailcap

WARN_ENTER_SECURE: False

WARN_LEAVE_SECURE: False

WARN_MIXED_SECURE: False

WARN_SUBMIT_INSECURE: False

ADD_URLS:

BOOKMARK_MENU:

PRINT_COMMAND: lpr

PRINT_REVERSED: False

PRINT_COLOR: True

PRINT_LANDSCAPE: False

PRINT_PAPER: 0</FONT></PRE>

<P>Even though this file states &quot;do not edit,&quot; you can get away with a few changes via a text editor. Keep in mind though, that any changes you make through the preferences dialog in the main screen may override what you edited manually.

<BR>

<P>The &quot;N&quot; display at the top right-hand corner of your display shows shooting stars as files are downloaded. If you want to stop any further transfers, you can click your mouse on this icon.

<BR>

<P>The bookmark feature is a bit more intuitive than for Mosaic. In fact, for some people, it's a bit easier to use and edit.

<BR>

<P>Netscape creates a .netscape_cache directory in your home directory, primarily for keeping track of images for HTML files. The size of this directory can get quite big after a few sessions of Netscape. Once in a while, if you are short of disk space, 
delete the files in this directory and the history file called .netscape-history file.

<BR>

<P>Another file of interest would be the .netscape-history file. This file can get large, too, after a few months of Web browsing, because this is where Netscape tracks where you have been. You can use this file as a guide to hunt for that special location 
that you just cannot remember now. If only my memory were this easily accessible.

<BR>

<BR>

<A NAME="E69E547"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Where To Get Netscape</B></FONT></CENTER></H4>

<BR>

<P>You can get netscape from www.netscape.com, the home site for Netscape Communications. Read the license agreements carefully. All you get is a 90-day evaluation period if you are not a student or are using it for commercial, as opposed to personal, 
reasons.

<BR>

<P>Installation is easy. Get the file from the www.netscape.com site and un-tar it. You will have all the executables and associated files in a subdirectory.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>If you are using Netscape Version 1.1, you will get an error or warning message that the environment variable XNLSPATH does not contain the correct config files. This causes the program to crash if you cut and paste text in its text fields. The 
included files have to be placed in /usr/X386/lib/X11/nls, or you should set XNLSPATH to the nls subdirectory where you installed netscape.

<BR>Your best course of action would be to get Netscape 2.01 (or the latest version) from the Web site at <A HREF="tppmsgs/msgs2.htm#220" tppabs="http://www.mcom.com/comprod/mirror/index.html">http://www.mcom.com/comprod/mirror/index.html</A>.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E68E433"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>SLIP Connections</B></FONT></CENTER></H3>

<BR>

<P>Setting up a SLIP connection is necessary if you are not already on the Internet. To get a dialup SLIP connection you have to use the /sbin/dip program. The dip stands for Dialup Internet Protocol. For a dedicated connection you should use the slattach 
program.

<BR>

<P>If you are already connected to the Internet through another means, skip this section entirely.

<BR>

<BR>

<A NAME="E69E548"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>dip</B></FONT></CENTER></H4>

<BR>

<P>The dip program uses a script file to connect you to a SLIP account. You need a SLIP account to use Mosaic. Using dip with a -t option can also let you run in interactive mode for debugging, but in most cases you use it with a script file.

<BR>

<P>A script file is basically a file that handles your login and setup for you. You invoke /sbin/dip with the script name as an argument. A sample script file to work with my Internet SLIP account is shown in Listing 56.2. Your Internet provider should 
provide a script for you. If it does not provide one, ask for it.

<BR>

<P>Let's look at this sample script file in Listing 56.2.

<BR>

<P>

<FONT COLOR="#000080"><B>Listing 56.2. A sample </B><B>dip</B><B> script file.</B></FONT>

<BR>

<PRE>

<FONT COLOR="#000080">main:

#

# Get the local and remote names for the network

#

get $remote remote

#

#

#

default

get $mtu 1500

port cua1

speed 38400

modem HAYES

flush

reset

send +++

sleep 1

send ate1v1m1q0\r

wait OK 2

if $errlvl != 0 goto error

send atdt5551212\r

if $errlvl != 0 goto error

# wait CONNECT 60

login:

sleep 3

wait login: 30

if $errlvl != 0 goto error

send johndoe\r

wait ord: 5

send doa+sol!\r

wait TERM 10

send dumb\r

wait $ 10

send dslip\r

wait Your 10

#

# get $remote remote

#

get $local remote

#

# Ask for the remote site's IP address interactively from the user

#

get $remote ask

# cannot do this dec $remote

done:

print LOCAL address is $local

print CONNECTED to $remote

print GATEWAY address $remote

default

mode CSLIP

goto exit

error:

print SLIP to $remote failed

exit:</FONT></PRE>

<P>Listing 56.2 shows how to access an Internet service provider via a dialup SLIP account. This script gives you an example of how to log into the remote system and get your local address, and even asks you for the remote IP address.

<BR>

<P>Normally, you run the SLIP script as root. You can set the permissions on the files in /etc/dip for all user access and not have to run as root. For debugging purposes, the -v option echoes all the script lines as they are executed. The echo on and echo 
off commands in script files turn the echoing on or off while executing. The -v option is like having the echo on command set as the first line in the script file.

<BR>

<P>The modem command in the scripts for dip only supports the HAYES parameter. You can set the speed with the speed command. For other parameters of your modem, use the Hayes command set. For example, send ate1v1m1q0\r sends the accompanying string to the 
modem to initialize it.

<BR>

<P>You can send output to the modem (and remote host) with the send command. To wait for a specific string, use the wait command with part of the string you are waiting for. Beware though, that if the string you are waiting for never appears, you can hang 
forever. The sleep command simply pauses the shell execution for the specified number of seconds. All variables for dip must be lowercase and preceded with a dollar sign. The dip program recognizes the following special variables:

<BR>

<PRE>

<FONT COLOR="#000080">$remote for remote host name

$rmtip for remote host IP address

$local for local host name

$locip for local host IP address

$mtu contains the MTU value for the connection.

_ You get this value from your internet provider.</FONT></PRE>

<P>The get command is dip's way of setting a variable. The following line requests the name of the remote host from the user. The ask parameter tells dip to prompt the user for the input.

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">get $remote ask</FONT></PRE>

<P>The local address for this script is derived when you log into your service provider. The remote host prints out a string of the form Your IP address is zzz.yyy.xxx.www. So the script waits for the Your string and then gets the last word on the line. 
Some SLIP service providers assign you a different address every time you log in, so you have to do this. The way to do this is as follows:

<BR>

<PRE>

<FONT COLOR="#000080">#

# Get local address from this string.

#

wait Your 10

get $local remote</FONT></PRE>

<P>The default command tells dip to route all default message traffic points to the SLIP link. The default command should be executed just before the mode command.

<BR>

<P>The mode command recognizes either SLIP or CSLIP as a parameter. CSLIP is the compressed SLIP mode. If all goes well, the dip program goes into daemon mode. The dip program executes the ifconfig program to automatically configure your interface as a 
point-to-point link.

<BR>

<P>Finally, to kill an existing dip process, you can use /sbin/dip with the -k option. You should do this when you turn off your machine or log out to free up your phone line.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Read <A HREF="tppmsgs/msgs0.htm#43" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl42.htm">Chapter 42</A>, &quot;Networking,&quot; to set your /etc/hosts file. Also, if you are not familiar with the ifconfig and traceroute commands, read the man pages for them. The ifconfig program configures and maintains kernel 
resident network interfaces. The traceroute command is useful in tracking messages as they come and go from your machine on the SLIP link. It is an invaluable tool for debugging.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E69E549"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>slattach</B></FONT></CENTER></H4>

<BR>

<P>The slattach file is used to connect on a dedicated line to a remote server. If your modem is on /dev/cua2, the command to configure a CSLIP connection is run as root:

<BR>

<BR>

<PRE>

⌨️ 快捷键说明

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