-->

Previous | Table of Contents | Next

Page 200

Like the ftp command, ncftp also has built-in help. The ncftp command, by Mike Gleason of NCEMRSoft, also sports a number of interesting command-line options. If you know the hostname of the computer and the complete path to a desired file, you can retrieve the file with a single command line, for example:


# ncftp -a ftp://ftp.mcp.com/pub/software/operating-sys/uslinux.txt

# nctp -a ftp.mcp.com:/pub/software/operating-sys/uslinux.txt

Both command lines will FTP to the ftp.mcp.com host, log in anonymously, then retrieve the uslinux.txt file. This is a handy way to retrieve known files from remote computers. These command lines may also be used in shell scripts, or combined with pipes to other commands to process the incoming files. You can, for example, automatically translate incoming graphics files and save them in a specified directory:


# ncftp -c ftp.wx.com:/pub/wxmaps/east/1230.gif | gif2tiff

 >/home/ftp/pub/wxmaps/today.tiff

This example (using a fictional ftp server) downloads a .GIF format graphic, then translates the graphic into .TIFF format and puts it into your system's ftp area. You can use this approach to download files automatically, especially when used in a crontab file. (For details about using crontab, see Hours 24, "Scheduling," and 18, "Personal Productivity Tools.")

You'll also find the ncftp status bar helpful when interactively downloading files. Although I can't show you the animation of the progress meter, when you use ncftp to download files, you'll get information on how the downloading is going, for example:


wustl> get app-defaults.color



Receiving file: app-defaults.color

100%  0 ==================================> 6583 bytes. ETA:  0:00

app-defaults.color:  6583 bytes received in 5.77 seconds, 1.11 kB/s.

ftp.wustl.edu   /packages/NCSA/Web/Mosaic/Unix/binaries/app-defaults

wustl>

This shows a completed download of the X11 application defaults file for the Mosaic Web browser. If you'd like to get the latest version of the ncftp command, you'll find it at ftp.probe.net, in the /pub/ncftp directory.

Browsing the World Wide Web with Linux Browsers

This section introduces you to half a dozen Web browsers for Linux. You'll find two of these

Page 201

browsers on the CD-ROM included with this book. The other four, Red Baron, Grail, Mosaic, and Netscape Communicator, must be retrieved from their home sites on the Internet.

This book doesn't have enough room to cover these browsers in detail. If you're interested in learning about Web browsers or writing your own Web pages, I suggest you look at the following books:

HTML by Example, by Todd Staufer, Que

Using HTML, by Mark Brown, John Jung, and Tom Savola, Que

Fast Browsing with the Lynx Command

The Lynx browser, sponsored by the University of Kansas, does not support graphics, sound, or any of the other plug-in features of today's modern Web browsers. You'll really like Lynx anyway because it's fast, efficient, and does not take up a lot of disk space.

Lynx was designed to run on regular displays, or terminals, so you don't need to run the X Window System in order to use it. This program is ideal for quickly browsing Web pages to get the information you need without the "World Wide Wait" of too-large graphics, or animations that just waste bandwidth.

The Lynx browser has 66 different command-line options, but it's easy to use. If you've properly set up your system, and have started your PPP connection, you can start browsing by specifying a Uniform Resource Locator (Web address) on the command line, for example:


# lynx 

http://www.mcp.com

Figure 13.1 shows the Lynx browser.

If you need to fine-tune some of the ways the lynx command works, you can edit its configuration file, lynx.cfg, in the /usr/lib directory. I suggest that you make a copy of this file, and copy it to your home directory with .lynxrc as the filename. In this file, you can set a number of Lynx features. For example, if you specify the name of your ISP's news server, you can read news:


NNTPSERVER:your.ISPnewserver.com

After you make this change, you can try to browse news with


# lynx news://your.ISPnewserver.com

You can also use the Lynx browser to retrieve files without browsing. By using this

Page 202

Figure 13.1.
The Lynx text-only
Web browser is a
compact, efficient
program you can use
to quickly browse Web
pages without waiting
for graphics loading.


approach, you can automatically research or get information on a regular basis.


# lynx 

http://www.yahoo.com/headlines/news/summary.html -dump >news.raw

Lynx will also download files just like other browsers if you press the Enter key while your cursor has a file or link highlighted. The basic navigation keys for this browser are the cursor and the Enter and Tab keys.

For more information about the Lynx browser, see its manual page.

Browsing with the Arena Browser

The Arena browser, found under the /usr/X11R6/bin directory, is an X Window System browser now supported by Yggdrasil Computing. New versions of this browser may be found at


ftp://ftp.Yggdrasil.com/pub/dist/web/arena

The Arena browser unfortunately does not obey any X11 Toolkit options. You can, however, load local HTML files, or specify a Web address on the command line, for example:


# arena index.htm

# arena 

http://www.mcp.com

Browsing with the Red Baron Browser

The Red Baron browser is a Web browser from Red Hat Software, Inc. and has most of the features you expect in a browser. You'll need to run the X Window System in order to

Page 203

use this browser.

You can use this browser to display, view, save, and print different Web pages. As with other browsers, you can also download files. However, unlike the Grail and Netscape browsers, Red Baron does not obey X11 Toolkit geometry settings.

If you need help while you're working with Red Baron, you can press the F1 function key on your keyboard. Red Baron will then read in its help files, which are found in the help directory under the /usr/lib/redbaron directory on your system.

If you find Red Baron similar to Mosaic, that's because it is a variant of the Mosaic browser, compiled to run on Linux systems without Motif libraries present.

Exploring Unique Features of the Grail Browser

The Grail browser is unique among Linux browsers. This browser is written using the python language, and comes with the full source code.

JUST A MINUTE
The Grail browser, from the Corporation for National Research Initiatives, is made up of 27,000 lines of interpreted python language source code. This browser, like the Lynx browser, is compact and efficient, and takes up only one-tenth of the hard drive space of other browsers such as Red Baron, Mosaic, or Netscape, but offers full HTML 2.0 compatibility, including forms, python language applets, graphics, and frames. For more information about the increasingly popular python language, browse to



http://www.python.org

You can use Grail like any other browser. You can simply type


# grail

to start the program, which will cause Grail to load, and then try to connect to its home page, http://grail.cnri.reston.va.us/grail. If the Grail browser takes up too much of your display, you can use X11 Toolkit geometry settings to have the browser create a smaller window, for example:


# grail -g 640x480+0+0

This will start the browser in a 640¥480 window at the upper-left portion of your screen. You can also specify an initial page to load from the command line, for example:


# grail 

http://www.mcp.com

Previous | Table of Contents | Next