文档搜索 > 4CustomizingIntroductionY

4CustomizingIntroductionY

4 Customizing

Introduction

You can alter some aspects of NCSA Mosaic’s behavior and appearance to suit
your needs and preferences. Among the features you can change are your home
page, the default font, and the appearance of anchors.

Ways to Change Defaults

X Resources

Functional resources control the look and feel of NCSA Mosaic and provide it
with some system-specific information. Visual resources mostly control the
appearance of anchors (hyperlinks). Font resources define the default fonts
NCSA Mosaic uses.

For information on X resources, link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/resources.html

Command Line Flags

Command line flags are used to change various aspects of how NCSA Mosaic
operates on your system. For example, you can use command line flags to tell
NCSA Mosaic to use a color or monochrome user interface, change your home
page, set your image cache size, or change the location of your global history
file.

For information on command line flags, link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/command-line-flags.html

Helper Applications

MIME Explained

How does Mosaic know that a GIF file is a GIF file and not a QuickTime movie
or a plain text file? Usually, the server tells Mosaic the MIME type of the file it
is sending. Originally, MIME—Multipurpose Internet Mail Extensions—was
just a method of including images, sounds and other non-text information in a
mail message. MIME has now been incorporated into other systems such as
the World Wide Web.

Based on a file’s MIME type, Mosaic knows whether to handle the file itself
(i.e., if it is an HTML file) or to pass it off to a helper application (also called an
external viewer.

Some servers (e.g., FTP servers) do not use MIME types. In that case, Mosaic
tries to infer the MIME type from the file extension. For example, a file ending
in .gif is assumed to be a GIF file; one that ends in .html is assumed to be an
HTML file.

You are able to modify the MIME types in the following ways:

? change which external viewer is used for a given MIME type

? define a new MIME type for a new file type

? add a new file extension and specify which MIME type it corresponds to

Multimedia Viewers

NCSA Mosaic attempts to use external programs to display files that it cannot
display itself, such as image or audio files. If an appropriate external program
cannot be located to handle the file, the Save Binary File To Local Disk window opens.
Insert a filename to save the file for use outside of the NCSA Mosaic program.

NCSA Mosaic uses a two-step process to determine which external viewer to
use:

1. The type of the incoming document is determined, either according to its
file extension (e.g., .gif or .au) or as specified by the document’s server. If
NCSA Mosaic must rely on the file extension, a default list or a user-config-
urable file is used to determine type.

2. NCSA Mosaic matches the incoming file’s type to an external viewer,
according to either the default list or the user-configurable file.

For information on external viewers, link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/mailcap.html

Mapping File Extensions to MIME Types

An extension map is a configuration file that maps file extensions to MIME
types. For example, the file extension .gif maps to MIME type image/gif
and the xv viewer.

For more information on file extension mapping, link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/extension-map.html

Where to Obtain Software

See “Obtaining Software” on page C–1 for information on obtaining viewer
software.

Changing Your Home Page

By default your home page is the NCSA Mosaic Home Page. If you want to
change your home page permanently, you must modify your.Xdefaults file.
You can change your home page on a session-only basis by including a com-
mand line flag in your start-up command (which can be included in a shell
script). The third possibility is to use a UNIX environment variable.

You only need to use one option given here to change your home page. Refer to
the URL below for information on how NCSA Mosaic processes the various
options to determine your home page:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/specifying-home.html

.Xdefaults File

To change your home page:

1. Go to the page that you want for your new home page and note the full
URL.

2. Open your .Xdefaults file with your favorite editor.

3. Insert a new line with the following format:

Mosaic*homeDocument: URL

For example, to designate the NCSA Home Page as your new home page when
you start NCSA Mosaic, enter the following in your .Xdefaults file:

Mosaic*homeDocument: http://www.ncsa.uiuc.edu/General/NCSAHome.html

Local Home Page

You can also create a personalized home page on your local hard disk. When
you use a local home page, NCSA Mosaic starts up more quickly because it
takes less time to read in a document from your hard disk than to download a
file from a server.

To create and set up a local home page:

1. Create your home page. See A Beginner’s Guide to HTML (On HTML... on the
Help menu) for an introduction on creating HTML documents.

2. Note the URL for your home page.

3. Open your .Xdefaults with your favorite editor.

4. Insert the new line with the following format:

Mosaic*homeDocument: URL

Command Line Flag

The -home command line flag may be used to specify an alternate home docu-
ment on a per-session basis by placing any URL after the -home flag. This line
can be included in a shell script.

For example enter:

% Mosaic -home http://www.univ.edu/welcome.html

to have NCSA Mosaic retrieve the welcome.html document from the Web
server named www.univ.edu.

Local Home Page

You can use a local document by entering:

% Mosaic -home /path/myhome.html

WWW_HOME Environment Variable

The UNIX environment variable WWW_HOME can be used in place of the
homeDocument resource in your .Xdefaults file. WWW_HOME overrides
the command-line or .Xdefaults values.

Setting Home when Compiling

You can also set a new home page when you compile NCSA Mosaic. The top-
level Mosaic Makefile lets you set the home document using the customflags
variable. In the Customization flags section of the Makefile insert a URL by
including:

customflags = -DHOME_PAGE_DEFAULT=\\\"URL\\\"

Changing Font Styles

You can change the font used in the Document View window by choosing Fonts
from the Options menu. The font choices you have are shown in the secondary
menu in regular, small, and large sizes. Experiment with the options and select
the one you prefer.

This selection is for the life of your current session. New windows inherit the
font and size from the original window.

Changing Your Default Font

You may want to change your font permanently. Make the change by adding a
line to your .Xdefaults file.

If you want to experiment with fonts other than the ones included on the Fonts
menu, enter xlsfonts at the system prompt to see what fonts are available on
your system. Note the specific information for the font you like. To your
.Xdefaults file add:

Mosaic*defaultFontChoice: "fontname"

For example, to change your default font to a Lucida Bright font add:

Mosaic*defaultFontChoice: "-b&h-lucidabright-medium-i-normal--12-120-75-75-p-67-iso8859-1"

Changing the Appearance of Anchors

To change the appearance of anchors, select Anchor Underlines from the Options
menu. You have five choices: default, light, medium, heavy, and no underline.
Experiment with the options and select the one you prefer.

To make a permanent change, modify your .Xdefaults file. For more infor-
mation, see the URL:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/resources.html

Creating a Configurable Documents Menu

NCSA Mosaic lets you create a Document menu, with the documents you specify
displayed on the pull-down menu. For additional information on this option,
link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/faq-documents-menu.html

Executing Local Programs via Hyperlinks

Some NCSA Mosaic users want hyperlinks to execute a local program such as a
shell script. There are security implications to local program execution that
should be carefully considered before implementation. For information on this
function, link to the URL listed below:

http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/executing-shell-scripts.html

设为首页 | 加入收藏 | 昂纲搜索

All Rights Reserved Powered by 文档下载网

Copyright © 2011
文档下载网内容来自网络,如有侵犯请和我们联系。tousu#anggang.com
返回顶部