Chimera 2

NOTE: This is documentation is very sparse and is badly organized but it is better than what was here before (nothing).

Chimera is a World Wide Web browser for UNIX-based computers running the X Window System. The documentation here refers to version 2.0 alpha. Chimera 2 is a complete rewrite and has almost no code in common with Chimera 1.

You can download Chimera 2 source from ftp.cs.unlv.edu.

Contents

Main

The code in the directory main is Chimera. The other directories contain libraries used by chimera to make a web browser. This directory contains code for dealing with buttons, displaying messages, and handling dialogs.

Configuration

Unlike version 1 of chimera, version 2 is written to be able to run without any configuration files. However, it is possible to modify the behavior of chimera using files that will be referred to as "resource" files. The resource file format is the same as the X resource format (Xrm functions are used) but are completely separate. It is recommended that you not use X resource files at all unless you really want to change the attributes of the Athena widgets (e.g. color, fonts, add hidden buttons, etc.). If you want to run version 1 and version 2 at the same time then I recommend that you write a wrapper script that changes XFILESEARCHPATH on the fly instead of installing the version 1 resource file in the X installation app-default directory.

Initialization

Chimera initializes the Xt libraries as usual and then initializes the WWW library with the following resource string:
cache.directory: /tmp
http.userAgent: Chimera/2.0alpha
Also passed is a colon-seperated list of resource files specified using the CHIMERA_DBFILES environment variable. If the environment variable is not defined then ~/.chimera/resources is used.

Main Resources

chimera.homeURL
The URL of the document that will be displayed when a toplevel window is created. It is ignored if the environment variable WWW_HOME is defined or there is a valid URL in the cut buffer or a URL is given on the command line.
chimera.cloneHome
The URL of the document that will be displayed in the toplevel of any clones created. It is ignored if a valid URL is in the cut buffer.
chimera.helpURL
This is the URL displayed when the help button is pressed.
chimera.urlLogFile
The name of a file to which to append toplevel URLs.
bookmark.filename
This is the file to use to store the bookmark list.
bookmark.header
This is the header to use for the bookmark file. It should be written so that the bookmark file resembles HTML.
bookmark.footer
This is the footer to use for the bookmark file. It should be written so that the bookmark file resembles HTML.

WWW Library

WWW Resources

The resource names are formatted as module.feature where module is the name of the module that uses the resource and feature is the feature to be modified. This list could be out-of-date by the time you read this.
cache.directory
The directory to use for storing cache files and the cache index file.
cache.persist
If this resource exists then do not remove cache files when chimera exits.

HTTP Module

HTTP Resources

http.userAgent
The string to send in the User-Agent field in HTTP requests.
http.acceptLanguage
The string to send in the Accept-Language field in HTTP requests.
http.open, http.read_unknown, http.read_known, http.done, http.send, http.waiting
Strings to use to indicate HTTP progress.

File Module

File Resources

file.autoLoad
Indicates the name of a file to load to a file URL is a directory. If the file doesn't exist in the directory then the directory listing is loaded.

HTML Module

HTML Resources

html.defaultFont
Font to use when no other font is available.
html.propFontPattern
XLFD pattern to use for proportional fonts. The font sizes should be wildcarded so that a range of sizes can be selected as needed.
html.fixedFontPattern
XLFD pattern to use for fixed-width fonts. The font sizes should be wildcarded so that a range of sizes can be selected as needed.
html.noteIconURL
The URL of an image to be used for the note block icon. This will probably disappear since the note tag isn't standard. Well, at least not the last time I looked.
html.leftMargin
The width in pixels of the left margin.
html.rightMargin
The width in pixels of the right margin.
html.topMargin
The height in pixels of the top margin.
html.bottomMargin
The height in pixels of the bottom margin.
html.textLineSpace
The height in pixels of the space between lines.
html.boxDebug
If this exists then the HTML renderer will draw borders on all of the boxes.

Bookmarks

The bookmark file is an HTML-ish file that can organize bookmarks under groups. Each group starts with a string delimited by 'h3' tags. Each bookmark is delimited by 'a' tags.

Bookmark Resources

bookmark.filename
Used to specify the name of the bookmark. There is no default and unless this is specified then the bookmarks will not work.

Example Resource File

Create a directory called ~/.chimera and put the following in a file called ~/.chimera/resources:
bookmark.filename: ~/.chimera/bookmarks.html
cache.directory: ~/.chimera/cache
cache.persist: true
chimera.homeURL: http://www.physics.unlv.edu/
html.propFontPattern: -adobe-helvetica-*-*-*-*-*-*-*-*-*-*-iso8859-1
file.autoLoad: index.spml
view.capFiles: ~/.chimera/mailcap:~/.mailcap
www.translationFiles: ~/.chimera/translations

External Viewers

The code for dealing with external viewers is in main/view.c.

External viewers are used to render content-types that chimera cannot render internally. Viewers can be specified using mailcap files. For example, the following mailcap file tells chimera how to display Postscript files and MPEG files:

video/mpeg; mpeg_play -quiet -dither 2x2 %s
application/postscript; ghostview %s

Resources

view.path
The shell PATH to set for external viewer programs.
view.capFiles
A colon-separated list of "mailcap" files to search for viewer programs. The files in the list are searched in order. The default is "~/.mailcap".

Specifying the Home Page

There are several ways to specify the home page when chimera begins. The first has the highest priority and the last has the lowest priority:
  1. Command line URL, if given.
  2. Cut buffer URL, if the cut buffer contains a valid URL.
  3. Environment variable WWW_HOME
  4. Resource chimera.homeURL
In all cases, only absolute URLs are allowed.