XGOPHER(1)

NAME
xgopher - gopher client for the X window system

SYNTAX

xgopher [root server [server port]] [-toolkitoption ...]

DESCRIPTION

xgopher is an X window system client interface to the gopher information server. Xgopher provides access to tremendous amounts of information which may be accessed from a local system or a remote information server. The source of the information is generally transparent, with data supplied from world-wide locations as easily as from a local on-campus server. The Gopher information system software is from the University of Minnesota.

OPTIONS
The installer of Xgopher normally configures the root server and server port options. Loosely speaking, the root server is the network name of the computer system that will provide your initial gopher menu. The port is a number that specifies system connection information. These options may also be specified via the resources described later in this document. For convenience, these options may be specified on the command line.

The X toolkit options are standard options available to every application written using the X toolkit (Xt). Please refer to your Xt documentation for a list and description of these options.

MAIN DISPLAY PANEL

The initial display will show the top level directory of gopher information available. Selecting an item from this list will fetch the contents of a file, subdirectory, or other information. The directory display may be updated to show the new subdirectory. A gopher item is a menu entry in this directory list. There are many types of gopher items handled by Xgopher, and each is explained below. An item is selected and highlighted by pointing at an entry with the mouse and clicking the left button. To unselect all items, click the mouse in either the directory title area or bookmark title area. You may select an entry in either the upper directory list item or the lower bookmark list. The display button marked Fetch selection is used to act on the selection. An accelerator allows you to simply "click" a second time on a highlighted item to activate the fetch. By default, all interactions use only the left mouse button. A directory is a collection of other files and directories. The directory items are displayed in a list with an identifying symbol to the left of each item. The symbol identifies the type of the item. The symbols may be changed by the installer or by each user. The default symbols are:

    blank
        Text file

    >>  directory

    <cso>
        a CSO name server (phone book)

    <idx>
        a full text index search

    <tel>
        a telnet session

    <tn3>
        a tn3270 session

    <img>
        an image file

    <bin>
        a binary file

    <snd>
        a sound file (spoken, sound effect, or music)

The file types are discussed below. From all but the top level directory, the Previous Directory button will return you to the previous directory that was displayed just before this one. A keyboard accelerator allows you to press the "u" key while the X pointer is anywhere on the main panel to achieve the same action.

BOOKMARKS
If you are viewing a directory that you may wish to return to later, set a bookmark there with the Add directory as bookmark button. This directory will be displayed with your other bookmarks in the lower scrolling region below the current directory list. If you already have an item selected, the buttons label will now read Add selection as bookmark and the item will be added to the bookmark list. Later, no matter where you have browsed through the gopher directory space, you may return to any bookmark by selecting it just as you would a regular directory item. You are brought immediately to that marked directory, The directory that you were in when you selected the bookmark becomes the previous directory. Other buttons and menu items let you remove individual bookmarks or all of the bookmarks. The main gopher directory that you see when you first start Xgopher is normally marked for you so you can easily and quickly return to the top level. Bookmarks are normally saved between your Xgopher sessions. When your start Xgopher, the file $HOME/.gopherrc is read to load your previous bookmarks, if any. When you exit Xgopher, your current bookmark list is written back to this file. Using the Option panel described below, you can change the name of your bookmark file any number of times during an Xgopher session, and use the Load bookmarks now and Save bookmarks now commands to manipulate several files of bookmarks. The bookmark save file should be compatible with the Unix curses client, bookmark file. Other resources described below that may affect bookmark processing are: bookmarkFile, loadBookmarks, appendBookmarks, markRoot, and allowBookmarkSave.

INFORMATION ABOUT ITEMS
Each gopher item and directory may be maintained by a remote computer system anywhere in the world. Sometimes it can be difficult to determine where the information is coming from. You can at least display the raw information which includes the name of the computer (host) that serves each gopher item. If you are viewing a directory with no items currently selected click the button labeled Info about directory, and the information for this directory will be displayed. If you already have an item selected, the buttons label will now read Info about selection and information about the selected item will be shown. The item that you select may be from either the directory list or the bookmark list.

GOPHER ITEM TYPES

    When the item selected from the directory list is a text file, the contents of the file are fetched and displayed as a pop-up text display window. Help information is displayed in this way also. The text display shows several command buttons and the text itself in a vertically scrolling window. The buttons are:
        Done	to release this text file and window,
        Page down	to position the text down one page,
        Page up	to position the text up one page,
        Print	to send the contents of this file to the printer,
        Save	to save the contents of this file in a
        	user-specified file.

    The Print or Save buttons may not always be available. They may be disallowed by the installer or system-wide resources file for Xgopher.

    Text displays use the text widget from the MIT-supplied Athena widget set. The text is given a read-only attribute, but all of the position, search, and selection capabilities of the widget are available. For the user who knows how to use these functions, there is this additional power. For example, entering control-S from the keyboard will bring up a text search panel allowing you to scan for any string in the file. Other control sequences allow more flexible text positioning than is provided by the scroll bar and paging buttons. All of these options are described in the Athena widget set documentation of the text widget. When the item selected is a CSO name server, a new window is displayed on the X display. The name of the institution supporting the name server is displayed at the top of the window. Below this are 4 areas. First are the control buttons: Done closes the CSO name server window; Help provides a text display with additional information; and Show Fields, discussed below. The next area is a single line text entry field where you type the name of the person you are looking up. The name server will usually be able to find someone by first name, last name, or both. Although, overly general searches are prohibited. For example, trying to look up "smith" is probably not a good idea in most of the United States. After entering the name, type a carriage return (enter) or click the mouse on the Do query button to submit the request. Additional buttons in the third area allow you to clear the query or result text areas. The result is displayed in the forth area, the bottom scrolling text region. The Show Fields button displays a pop up menu. Select an item from this menu to list the names and a brief description of the fields in the data base being searched. Note that these fields may be different for every institution! Listing default fields will show the things that are returned for a normal query (usually name, address, phone number, department, plus others). Indexed fields are those that you can use to search for (usually name and perhaps office phone). Lookup fields are those that can be used to narrow the search (for example, department). Finally, Public fields are all the fields that can be viewed by everyone. A query may include more than just a name, for example, legitimate queries are:

        john smith
            This will return every John Smith in the selected data base. If there are more than a handful, the name server will complain that there are too many to give you. In this case, you may want to try the next example.

        smith department=biology
            The department will help narrow the search to only those people in the department of biology.

        j* smith department=biology
            A "*" matches any characters and will help if you are not sure of the exact spelling of a name or only know initials.

        john smith department=biology return all
            The return option may specify a field you are interested in or the value "all" to get all public fields returned.
    The CSO name server window may be left on the X display as long as you like. Once displayed, it operates independent of the gopher directory traversal. If you want to switch to search another institution's phone directory you can select it from the appropriate directory list without first closing a prior CSO name server window. The same window is re-used for the currently selected institution. An index search is a very powerful way of obtaining a list of documents which contain (or do not contain) certain words. When you select an index search item, a small pop-up panel asks you for a list of search words. You can enter one or more words, plus the special reserved boolean operators and, or, and not. For example, if you want information on setting certain terminal parameters for Unix, you may enter:
        terminal and setting or tset
    which will find all documents in the search space which contain both the words "terminal" and "setting", or the word "tset". The "or" is non-exclusive so the document may contain all of the words. The input words may be in upper- or lower-case, and will match words of either case. After entering the words, press carriage return (enter) or click the mouse on the Do query button and the search will be carried out. The result of the index search looks very much like a normal gopher directory of text files, but each file is one that matches your specified criterion. You will see a difference in the display of the text file, however. Every word (or part of a word) that matches the index words will be highlighted in the text display. This allows you to quickly locate the parts of a document that are interesting to you. Telnet sessions are normally text-based information services, for example access to University library holdings. When you select an item which is identified as a telnet session, A new xterm window (normal terminal emulator window) will be created and it will be running a telnet session. It may take a few seconds for the xterm window to show up. Some hosts that you connect to may require you to enter a username (login name). If so, then Xgopher will pop up an information window showing you the name to use once the telnet session is started. Many telnet sessions require you to enter a terminal type as a part of the startup interaction. Usually, you should choose vt100, as the xterm commands are very similar to that of a DEC VT100 terminal. Telnet sessions may be disallowed by the allowTelnet resource described below. If telnet sessions are not allowed, an error message will be displayed to that effect. tn3270 sessions are normally text-based information services; similar in concept to telnet sessions, but using a different terminal emulation protocol. When you select an item which is identified as a tn3270 session, A new xterm window (normal terminal emulator window) will be created and it will be running a tn3270 session. It may take a few seconds for the xterm window to show up. Some hosts that you connect to may require you to enter a username (login name). If so, then Xgopher will pop up an information window showing you the name to use once the tn3270 session is started. tn3270 sessions may be disallowed by the allowTn3270 resource described below. If tn3270 sessions are not allowed, an error message will be displayed to that effect. For the X window system, X3270 is an alternative to tn3270 that many people prefer. Whereas tn3270 executes as an application within an xterm window and doesn't understand X at all, X3270 is a true X application. tn3270 is available (vendor-supplied) on most Unix systems. X3270 is publicly available software, but not supplied as a part of Xgopher. If your site provides the X3270 program, you may use it instead of tn3270. The IBM 3278 terminal character set and behavior is closely emulated by X3270. Colors are used to distinguish normal, bold, and input fields. Every key on the keyboard may be mapped to a 3278 function using one of the supplied keyboard maps or the X application defaults file. The following commands are usually built into Xgopher or the system resources file when the program is installed, but you may modify your own application resources to use a command such as the following for tn3270:
        xterm -e tn3270 or aixterm -e tn3270 (for IBM AIX systems) If you choose X3270 instead, the command is:
        x3270 When an image file is selected for processing, Xgopher retrieves the file, then runs another program to display the image on an X display. This second program is often xloadimage. The installer of Xgopher, or any user, may change this to be any other program that is available. xloadimage is a particularly nice program because it will display other file types besides GIF using heuristics to determine the type of the file. The imageCommand resource specifies the command that will be used to display the image. Interesting choices are:
            xloadimage    (normal behavior, with messages output)
            xloadimage -quiet    (the Xgopher default - no messages)
            xv    (another nice gif viewer available)
    Neither xloadimage nor xv are a part of the Xgopher distribution. Many sites that run X already have one of these programs installed. A large image may take many seconds to appear as considerable processing may be required before the display. Several images may be displayed at once. The way to remove an image depends on the command used to display the image. For xloadimage, typing the letter "q" within the picture display will remove the image. The allowImage resource may be used to disallow processing of image files. Binary file types are not precisely defined in the gopher community, but many Unix files that are compressed (.Z) or tar archives (.tar) are assigned the same binary item type in gopher (type 9). When you select one of these files, Xgopher prompts you for a file name on your local system. The dialog box that pops up for this file name will suggest the same name as the remote file; you may change this name if it is not satisfactory. The files are then processed (or fetched) by simply copying the data to your specified file. Processing a binary type of gopher item with the Fetch selection button is identical to using the Copy command on the same item.

    The allowCopy resource determines whether copying is allowed. If not, a message is displayed. If your X display is a workstation that supports sounds, then you can play files containing spoken words, sound effects, or music through Xgopher. Selecting a sound file will cause that file to be "played" through your workstation's audio device. Only a single sound file can be active at a time; you will be warned if you try to play a sound before a previous one is through. Use the application resources hasSound and soundCommand described below.

COPYING FILES DIRECTLY
The Copy item in the Other Commands menu can be used to copy a gopher item directly to a file without first processing or displaying the gopher data. If the item type is a text file, an ascii mode copy will be done, preserving end-of-line conventions for your system. Other data files and unknown item types are copied in binary mode until an end of file is encountered. It makes no sense to copy directories, CSO name servers, index directories, or telnet sessions, so the copy command will reject requests to copy these. When you chose the Copy command, Xgopher prompts you for a file name on your local system. The dialog box that pops up for this file name will suggest the same name as the remote file; you may change this name if it is not satisfactory. The copy command is one way to access gopher item types that are not normally processed by Xgopher.

If the allowCopy resource is false, then the copy command is not shown in the menu.

DIRECT ENTRY OF A GOPHER ITEM
This function is not for the beginning or casual user of Gopher. Sometimes a reference is available to a specific gopher item available, perhaps without specifying all the menus to traverse. If you know all the access information for a piece of data anywhere in gopher space, you may use the Enter Gopher Item command in the Other Commands menu to directly access this data. When you select this command a panel is displayed for you to enter the type, path, host, port, and optionally name of the item. A help display is available to explain these items a bit more.

A neat trick: Any gopher data can be fetched as a text file by entering its host/path/port and setting the type to 0 (ascii text file). Even a directory can be fetched as text in this way. Similarly, any gopher data may be retrieved as binary by setting the type to 9 (binary file type). This works even for types unknown to Xgopher.

OPTIONS PANEL
Some Xgopher options may be changed during a session. These are available on the Options Panel pop up display which is selected from the Other Commands menu. The bookmark file, and system commands for printing, image display, and telnet sessions may be changed using this panel. A help display is available with this panel to further describe the options.

If the optionsButton resource is false, then the Options Panel command is not shown in the menu.

RESOURCES

The application class is Xgopher. Most of the user-interface is configured in the app-defaults file; if this file is missing a warning message will be printed to standard error and the program will terminate. All of the important defaults are established in the system app-defaults file, normally installed as /usr/lib/X11/app-defaults/Xgopher.

The defaults mentioned below may have been changed by the installer for a specific system. They may all be overridden in by individual preferences. The application specific resources are grouped below by category. Startup

    rootServer (class RootServer)
        Specifies the initial gopher information server host name as an internet address.

    rootPort (class RootPort)
        The port number of the top level gopher server to connect to. The supplied default is 70.

    rootPath (class RootPath)
        The initial selector string or path name to retireve the top level menu. The supplied default is the null string.

    helpFile (class HelpFile)
        This is the absolute or relative path name of the file to be displayed when the help command button is depressed. The supplied default is /usr/lib/X11/xgopher/xgopher.help

    mainTitle (class MainTitle)
        The main title displayed above the listing of the top level directory. The supplied default is "UIUC Gopher Information Service".

    bookmarkFile (class bookmarkFile)
        The name of the file containing Xgopher bookmarks. This is also the file that bookmarks will be written to when you exit Xgopher. This file name may be changed during a session using the options panel. The supplied default is "$HOME/.gopherrc".

    loadBookmarks (class loadBookmarks)
        Whether or not to load bookmarks automatically when Xgopher starts. The supplied default is True.
External Commands

    printCommand (class PrintCommand)
        This is the print command used to spool a print request. Useful examples of print commands are lpr or enscript. The gopher internal file name containing the text is appended to the end of the command supplied. As an option, if the 2 characters %s appear in the print command string anywhere, they are replaced by the file name. The %s may even appear more than once. If %s appears, then the file name is not appended to the end. The supplied default is: "# print" without the quotes. It is a comment.

    telnetCommand (class TelnetCommand)
        The command Xgopher will use to start a telnet session. The host and port number are added to the end of this command. The resulting command is executed (via the system(3) function) to provide a telnet session. In general, the telnet command should be executed by an xterm as with the default (xterm -e telnet). In some environments (such as OpenWindows), it may be useful to specify the full path name of both the xterm and telnet commands. For example, /usr/bin/X11/xterm -e /usr/ucb/telnet. This command should be disabled for secure environments such as public access terminals, as it is easy to start a shell from a telnet session. The supplied default is "xterm -e telnet" (without the quotes).

    tn3270Command (class Tn3270Command)
        The command Xgopher will use to start a tn3270 session. The host and port number are added to the end of this command. The resulting command is executed (via the system(3) function) to provide a tn3270 session. In general, the tn3270 command should be executed by an xterm as with the default (xterm -e tn3270). In some environments (such as OpenWindows), it may be useful to specify the full path name of both the xterm and tn3270 commands. For example, /usr/bin/X11/xterm -e /usr/ucb/tn3270. This command should be disabled for secure environments such as public access terminals, as it is easy to start a shell from a tn3270 session. Examples of useful tn3270 commands are:
            Xgopher.tn3270Command: xterm -e tn3270
            Xgopher.tn3270Command: aixterm -e tn3270 (for IBM AIX systems)
            Xgopher.tn3270Command: x3270 The supplied default is "xterm -e tn3270" (without the quotes).

    imageCommand (class ImageCommand)
        The command to use to display an image file to the X display screen. The name of the local temporary file containing the image is appended to the end of this command before it is executed. This command is never executed if the allowImage resource is False. The supplied default is "xloadimage -quiet" (without the quotes).

    soundCommand (class SoundCommand)
        The command to use to get a sound file from the standard input stream (stdin) to the audio device. On many workstations this command may be called "play". Another command which may be useful is "cat > /dev/audio". The supplied command is started by Xgopher as a separate process with sound data fed into its standard input. This command is never executed if the hasSound resource is False. The supplied default is "play" (without the quotes).
Behaviour

    allItems (class AllItems)
        Show all gopher items, even types not understood by Xgopher. When false, some items may not be displayed as Xgopher has no idea what to do with them. The supplied default is True.

    appendBookmarks (class AppendBookmarks)
        When this resource is true, loading a new bookmark file will append the new bookmarks to your current list. When false, the new bookmarks will replace the current list. The supplied default is True.

    doubleClick (class DoubleClick)
        Normally a gopher item or directory is selected by "clicking" on it. Then the Fetch button is pressed to process the request. If this resource is true, the fetch action may be invoked by simply re-selecting the same item already selected. This is a double-click on that item, although with no time limit between clicks. It may be disabled for example, if a touch sensitive screen replaces the mouse, to ensure more reliable operation. The supplied default is True.

    markRoot (class MarkRoot)
        When true, a bookmark is automatically set at the top lever (root) directory. If you do not want to have this bookmark set, change the value of this resource to False. The supplied default is True.

    resetOptions (class ResetOptions)
        Options changed on the options panel popup will be reset to their original default values when a restart command occurs if this resource is true. The supplied default is True.

    logFile (class LogFile)
        If a file name is provided, all directory changes, remote host connections, and errors are logged to this file. If nothing else, it provides a trail of where you have been and allows some simple diagnostics to determine what remote machines are not accessible. If no file name is provided, no logging occurs. The supplied default is no log file.

    hasSound (class HasSound)
        This flag indicated whether the X display being used has the ability to play general sounds, such as spoken words, sound effects, and music. For example, an X terminal will not normally have this ability, but some workstations such as the Sun SparcStation can play sounds. The supplied default is False.
Security

    allowPrint (class AllowPrint)
        If this boolean resource is true, text displayed in pop up windows may be spooled to a printer by depressing a Print button. If False, the button will not be displayed. The supplied default is True.

    allowSave (class AllowSave)
        If this boolean resource is true, text displayed in pop up windows may be saved to a user-specified file by depressing a Save button. If False, the button will not be displayed. The supplied default is True.

    allowTelnet (class AllowTelnet)
        If this boolean resource is true, telnet sessions are allowed. If False, they are inhibited with an error message displayed to that effect. This resource should be False in secure environments such as public access terminals, as it is easy to start a shell from a telnet session. The supplied default is True.

    allowTn3270 (class AllowTn3270)
        If this boolean resource is true, tn3270 sessions are allowed. If False, they are inhibited with an error message displayed to that effect. This resource should be False in secure environments such as public access terminals, as it is easy to start a shell from a tn3270 session. The supplied default is True.

    allowCopy (class AllowCopy)
        If this boolean resource is true, the Copy button is displayed and files may be directly copied to a user-specified file. Also, binary files may be fetched. If False, the button will not be displayed, and binary file access will be disallowed. The supplied default is True.

    allowBookmarkSave (class AllowBookmarkSave)
        The current bookmark list will be written to the current bookmark file when you exit or restart Xgopher if this resource is true. The bookmark file name may be changed during a session using the options panel. The supplied default is True.

    allowImage (class AllowImage)
        If this boolean resource is true, image display is allowed. If false, it is inhibited with an error message displayed to that effect. The supplied default is True.

    optionsButton (class OptionsButton)
        The Options panel button in the Other Commands menu will not be displayed if this resource is false. Then, no resources may be changed during a session. The supplied default is True.

    restartButton (class RestartButton)
        If false, the Restart command button in the Other Options menu will not be displayed. This is most useful in conjunction with the swapRestartAndQuit resource. The supplied default is True.

    swapRestartAndQuit (class SwapRestartAndQuit)
        If true, the functions of the quit and restart buttons are swapped. Remember to also change the button labels. This may be used in a public-access Xgopher terminal to easily retreat to a known state, but not-too-easily terminate Xgopher entirely. The supplied default is False.
Prefixes

    prefixFile (class PrefixFile)
        This prefix is shown in the directory listing to the left of text files. The supplied default is blank for text files.

    prefixDir (class PrefixDir)
        This prefix is shown in the directory listing to the left of directory entries. The supplied default is 273 (an octal escape sequence), which is a single character in the Latin-1 character set which looks like >>.

    prefixCSO (class PrefixCSO)
        This prefix is shown in the directory listing to the left of entries which are CSO name servers (phone books). The supplied default is <cso>.

    prefixTelnet (class PrefixTelnet)
        This prefix is shown in the directory listing to the left of entries which are telnet sessions. The supplied default is <tel>.

    prefixTn3270 (class PrefixTn3270)
        This prefix is shown in the directory listing to the left of entries which are tn3270 sessions. The supplied default is <tn3>.

    prefixIndex (class PrefixIndex)
        This prefix is shown in the directory listing to the left of entries which are full text index searches. The supplied default is <idx>.

    prefixImage (class PrefixImage)
        This prefix is shown in the directory listing to the left of entries which are image files. The supplied default is <img>.

    prefixBinary (class PrefixBinary)
        This prefix is shown in the directory listing to the left of entries which are binary files. The supplied default is <bin>.

    prefixSound (class PrefixSound)
        This prefix is shown in the directory listing to the left of entries which are sound files. The supplied default is <snd>.

    prefixUnknown (class PrefixUnknown)
        This prefix is shown in the directory listing to the left of entries which are unknown file types. This prefix is displayed if allItems is true. The supplied default is <???>.
Performance and Configuration

    directoryTime (class DirectoryTime)
        Directory entries for all active directories (current directory, directories with bookmarks, and all of their ancestors) are saved for this many seconds. After this time, their contents are released and re-requested from the appropriate place when needed. This caching of directory contents makes moving up the directory tree and jumping to bookmarks quite fast. The very small potential risk is that the contents of a directory in a gopher server may be changed while the directory is stored. The caching, freeing, and reloading of directories is transparent to the user. The supplied default is 600. This is 10 minutes.

    itemStart (class ItemStart)
        Not normally changed by the user, this determines the amount of memory dynamically allocated when xgopher starts execution to hold gopher items (directory contents). The supplied default is 500.

    itemIncrement (class ItemIncrement)
        Not normally changed by the user, this determines the amount of memory dynamically allocated each time xgopher needs additional memory to hold gopher items (directory contents). The supplied default is 50.

    dirStart (class DirStart)
        Not normally changed by the user, this determines the amount of memory dynamically allocated when xgopher starts execution to hold gopher directories. The supplied default is 50.

    dirIncrement (class DirIncrement)
        Not normally changed by the user, this determines the amount of memory dynamically allocated each time xgopher needs additional memory to hold gopher directories. The supplied default is 10.

    tempDirectory (class TempDirectory)
        The directory for xgopher to create files that it will need for display or other purposes, but will not exist beyond this xgopher session. The supplied default is /tmp.

/fBWidget specific resources:

The X Toolkit and Athena Widgets documentation covers the widget specific resources. The most significant widget specific resources are mentioned here.

font (class Font)
    All text, label, and command button widgets have a font that can be selected.

label (class Label)
    All command button widgets and many labels text strings may be changed, for example to another language.

FILES

 /usr/local/lib/X11/app-defaults/Xgopher

 /usr/local/lib/X11/xgopher.help

SEE ALSO

Installers should see the internal documentation for changes to the configuration file before compiling and installing Xgopher.

BUGS

The gopher+ protocol is not yet supported.

COPYRIGHT
Copyright 1992 by the Board of Trustees of the University of Illinois
This program with copyright notice intact may be freely distributed without permission.

AUTHOR

Allan Tuchman, Computing and Communications Services Office, University of Illinois at Urbana-Champaign, Urbana, Illinois, USA. email to: a-tuchman@uiuc.edu.