Internet Online Services: gopher
In the last issue (Sys Admin, Jan/Feb 1994), I introduced
to archie, a simple yet powerful tool for retrieving
from the Internet. One of archie's shortcomings is its
ability to perform topic-oriented searches. For the
most part, when
you look something up with archie, you are matching
string against a file or directory name. When you are
a particular piece of software that is freely available,
usually present a problem. For instance, if I want to
find the latest
version of the perl programming language, I know that
thing to do with archie is use a search string of "perl."
However, if I'm looking for a 1990 census report for
York, using archie only leads to a dead end. That doesn't
mean I won't find that information somewhere on the
does it necessarily mean that the information doesn't
exist on an
anonymous ftp site registered with the official archie
servers. It only means that I will have difficulty locating
using a keyword search like "massena." In
fact, after several
attempts, with several different search strings, I was
unable to find
what I was looking for with archie. So, how can I find
information on the Internet? I used gopher!
What Is gopher?
gopher is an Internet information search and retrieval
system, developed by the Computer and Information Services
at the University of Minnesota. With gopher you can
to a wide variety of information both inside and outside
gopher presents information to you in the form of menu
By selecting a menu item of interest, you may either
a text file, accessing another menu, or executing a
to access a particular resource. The information that
menu choice leads you to may come from the local system
or it may be a link to another gopher server on a computer
on the other side of the world.
Figure 1 shows the main menu of the gopher server running
at the University of Minnesota. Using gopher is as simple
as choosing the item from the current menu that seems
to be most relevant,
and continuing until you find what you want. If at any
time you find
you've strayed away from your intended goal, you can
retreat to the
Like archie, gopher consists of server software for
providing the information, and client software for accessing
In this article, I discuss both sides of gopher. Two
gopher clients are available from the University of
one for ASCII terminal users and one for X Window capable
I will briefly cover the gopher server, and what types
information you can present with it.
I recommend that you begin by downloading the gopher
The best place to go is right to the source, the University
Using anonymous ftp, connect to boombox.micro.umn.edu.
Enter "anonymous" as a username, and your
e-mail address as
a password. Once you're in, change to directory /pub/gopher/UNIX.
Here you will find a number of compressed tar files
gopher software. You'll want to retrieve gopher2.010.tar.Z;
if you have X Window capabilities on your network, get
as well (in both cases the version number may be higher
by the time
you read this). The first file contains the software
for both the
gopher server, and the gopher client for ASCII terminals.
The second file is the X Window System based client.
You'll also want
to retrieve the "Gopher Guide" from /pub/gopher/docs.
This document is available either as a PostScript file
or as straight
text. Remember to put ftp into binary mode before transferring
gopher Client Programs
The ASCII terminal client, gopher, is part of the gopher
distribution file, gopher2.010.tar.Z, which also contains
the gopher server software. The X Window-based client
When you extract the main gopher distribution, the directory
that is created will contain a makefile at the top level
builds both the client and server software. Before you
the software, read the file INSTALL, located in the
subdirectory, for detailed information on getting started.
need to edit two files to get gopher compiled and installed
properly, Makefile.config and conf.h. Both are located
at the top level of the gopher directory, and both contain
explicit instructions for changing the values of various
so as to customize gopher for your environment.
Perhaps the most important settings are in conf.h. These
CLIENT1_HOST, CLIENT2_HOST, CLIENT1_PORT,
and CLIENT2_PORT. The first two relate to the default
that the gopher client will attempt to connect to. If
intend to run your own gopher server or servers, set
to the host names of the primary and secondary gopher
you want for defaults. The latter two variables tell
client which TCP port number to use when attempting
to connect to
the gopher server. The default of 70 is appropriate
that port is already in use on the computer where your
server will be running. If that is the case you'll need
the default to the number of an unused port.
Makefile.config contains variables related to what compiler
you will use on your system, and the names of the directories
you would like the various pieces of the gopher software
be installed. Once you have made all the necessary changes,
can build the software by executing make. If you only
to build the client software, use
% make client
Once you've successfully built the client software,
can run it. If you didn't change the default host, gopher
will connect to the predefined default, which is the
server at the University of Minnesota. This will display
shown in Figure 1.
Once you are confident that your gopher client is built
you can install it, providing you made the appropriate
Makefile.config, by typing
% (cd gopher; make install)
The other important piece of client software is xgopher.
program provides a simple graphical user interface,
where menu items
can be selected via mouse, and files are displayed in
a separate window.
If a gopher server is making graphics image files available,
selecting them causes gopher to bring them up using
the viewer you
have specified in the configuration file. This functionality
a program like xv or xloadimage, both readily available
from numerous anonymous ftp sites (archie, described
in the previous issue, would be a good way to find these).
client, like the xarchie client, uses an imakefile,
and is simple to build (read the README file before
There is also a conf.h file to be modified, as in the
client. Again, an important element in this file is
the name of the
default gopher server to which xgopher will connect.
The gopher Server
If, after some experience with gopher or xgopher,
you decide that the users on your network could benefit
from a local
gopher server, you'll need to compile the gopher server
software. After modifying Makefile.config and conf.h,
as discussed above, you can build the server software
% make server
To install the gopher server, execute
% (cd gopherd; make install)
This will install the gopher server, gopherd,
and its supporting files in the locations you named
You'll then need to set up the host on which gopherd
run, to ensure that the gopher server will be run whenever
the computer is rebooted. You can do this using start-up
/etc/rc.local, or you can add an entry to the inetd.conf
file, if your system uses inetd. You'll want to read
7 of the Gopher Guide, "Configuring the UNIX Server,"
has detailed information on this setup.
There's more to be done than just getting the gopher
running on your network. You must also decide what kinds
you will make available. Figure 2 lists the types of
gopher can present to your users. One of the options
in Makefile.config is the location of your gopher
data. This location will initially be a directory which
The contents of this directory determine how your information
be presented to gopher clients connecting to your server.
The contents of the top-level gopher directory represent
first menu that a gopher client user will see. If there
subdirectories, choosing those brings you to another
menu, whose entries
will be the contents of that subdirectory. Ordinary
text files will
be displayed to the user upon selection. Files whose
names begin with
a period are special files, called links, which I'll
discuss in detail
later. Other defaults for files within your gopher data
relate to sound files, graphics images (GIF), and other
"Gopher Guide" details all of these.
Where gopher gets interesting is with the links, or
files." These files, which will not show up directly
on the gopher
menu, can be used to refer to gopher data on your own
or from other gopher servers on the Internet. Figure
an example of one of these links. The Numb field is
place a menu item at a specific position in the gopher
The Name field is used to specify the text that will
in the gopher menu for that item. The Type field corresponds
to the type of the gopher data, as presented in Figure
Port represents the TCP port number of the gopher
server being linked to. Path specifies the path within
data directory of the server where the information is
is the fully qualified domain name of the host where
server is running. The example in Figure 3 is a link
to a gopher
directory at gopher.internet.com. The title of the entry,
as it would appear on your gopher client session is
World Magazine." One important point to note here
is that the
gopher server in this case is being run on TCP port
rather than the default port 70.
As you explore the Internet using gopher, you will come
information of interest to your users. Rather than rely
on their finding
such things themselves, you may choose to create links
to them somewhere
within your own gopher data directory. Both gopher clients
mentioned in this article can tell you how to create
your own link.
From the gopher ASCII client, position the menu pointer
on an item
of interest and press the = key. This will present you
a screen containing the values of the various fields
used in a link.
From xgopher, clicking the mouse on the "Info about
button accomplishes the same thing. Once you have this
you are ready to create your own link. Create a file
with a name beginning
with a period in your gopher data directory. Enter the
information for each field described in the preceding
You need not restart the gopherd process to "see"
the new data. The next time a gopher client connects,
new information will be available. You may also want
the link shown in Figure 4. This will take you to a
menu listing all
of the "known" gopher servers in the world
all those who have registered with the maintainers of
at the University of Minnesota). This link provides
a useful starting
point for exploring gopherspace.
veronica (Very Easy Rodent-Oriented Net-wide Index to
Archives) is a service by which you can perform keyword
the titles available in gopherspace. veronica searches
launched from your gopher client, and the results are
to you as another gopher menu, from which you can select
of the items returned as a result of the search. Figure
5 gives the
link information you can use in your gopher server to
your users to make veronica searches.
I have only scratched the surface of the features and
of gopher. For complete and definitive information,
out the "Gopher Guide."
gopher provides tremendous potential as an information
in a networked environment. You can use it either as
board" on your own local network or as a means
of providing information
to the Internet at large. Give gopher a try. Use it
the Internet for a while. You'll be amazed at what you
can find in
Krol, Ed. The Whole INTERNET User's Guide
& Catalog. Sebastopol, CA: O'Reilly & Associates,
1992. ISBN 1-56592-025-2.
About the Author
Chris Bush began his UNIX life in 1984 as a college
student, typing in troff commands for research documentation.
Chris has a B.S. in Computer Science
from the University of Buffalo, and is currently working
on his Masters.
He can be reached electronically at email@example.com.