gale.org
Home > Documentation > for Users > Variables

Configuration Variables

Gale programs, such as gsend and gsub, use configuration variables for configuration and customization. These variables may be set through several means (described below). Each variable has a name (such as "GALE_DOMAIN") and a value; the interpretation of the value depends on the variable.


Configuration File Locations

Configuration variables may be specified in several different places:

The Environment
Configuration variables may be set directly in the environment; this will override any other setting for this variable.
A $GALE_CONF file
If the GALE_CONF variable is set in the environment, Gale will search for a file by that name relative to a ".gale" directory in the user's home directory. Variables set in that file override settings from any other file. The ".gale" directory's location may be changed with the GALE_DIR variable. GALE_CONF is rarely used, but some people find it useful to allow a run-time choice between alternate configuration files.
The "~/.gale/conf" file
Gale always searches for a file named "conf" in the user's ".gale" directory (or GALE_DIR, if set). Variables set in this file override settings from the system-wide configuration file (below). This is the most common location for user configuration.
The "${prefix}/etc/gale/conf" file
Finally, Gale searches for a file "conf" in the "etc/gale" directory under its installation prefix ("/usr/local" by default, thus "/usr/local/etc/gale/conf"). Variable settings in this file take effect only if they are not specified anywhere else. This is the usual location for system-wide configuration.

Configuration File Format

All of the above configuration files have the same format. Blank lines (containing only whitespace) and lines beginning with the comment character "#" (octothorpe) are ignored. Lines beginning with whitespace (tabs or spaces) are considered an extension of the previous line. All other lines are expected to contain the name of a configuration variable, followed by whitespace, followed by the variable's value.

Here is an example ".gale/conf" file:

% cat ~/.gale/conf
# Subscriptions.
GALE_SUBSCRIBE egnor@ofb.net
        pub@ofb.net - pub.tv@ofb.net - pub.sports@ofb.net
        local@ofb.net new@gale.org
        gateway@gale.org - gateway.slashdot@gale.org                            

# My preferred name.
GALE_NAME
    Dork Man
%  












List of Variables

Here are all the variables Gale programs understand.

GALE_AUTH_BITS
The bit length (a decimal integer) used when generating a user's encryption key. The default is 768. Note that this variable only takes effect when generating a key.
GALE_CHARSET
The default character set to use for I/O. Gale's internals use ISO 10646 ( Unicode) exclusively; by default, text is "flattened" to ASCII for input and output. This variable lets you use a different character set, such as "iso-8859-1" or "utf-8".
GALE_CHARSET_CONSOLE
The character set to use for console I/O (standard input and standard output). This variable allows Gale to use one character set for the console and a different character set (specified by other GALE_CHARSET variables) for other purposes, such as file I/O. This is quite useful in conjunction with internationalized terminal emulators, like a UTF-8 xterm or Chinese xterm.
GALE_CHARSET_CMDLINE
The character set to use for interpreting command-line arguments. Since arguments are generally specified on the terminal, this is usually set to the same value as GALE_CHARSET_CONSOLE.
GALE_CHARSET_ENVIRON
The character set to use for environment variables.
GALE_CHARSET_FILESYSTEM
The character set to use for filesystem I/O. This includes both the contents of files (such as configuration files) and filenames themselves.
GALE_CHARSET_SYSTEM
The character set used by the core operating system for hostnames, usernames, and the like.
GALE_COLUMNS
The width of the terminal. This is used to format the default gsub output and in a few other places. Normally you don't need to set this variable, since Gale will automatically detect the width of your terminal, but it may be useful to override the default sometimes.
GALE_CONF
The name of an auxiliary configuration file in the user's "~/.gale" directory, whose contents should take precedence over other configuration files. This variable may only be set in the environment (since it takes effect before any configuration files have been read). See the section on configuration file locations, above. There is no default.
GALE_DIR
The directory containing the user's personal Gale files (including configuration files, keys, scripts, and other miscellany). The default is "$HOME/.gale".
GALE_DOMAIN
The gale domain to use by default. This controls the form of the default value for GALE_ID, the default domain appended to unqualified addresses (as in " gsend someone" without an "@"), and the server to connect to. This variable must be set somewhere; the Gale installer usually sets this in the system-wide configuration file.
GALE_FROM
The "friendly name" used to identify yourself in Gale messages. This setting is obsolete; use GALE_NAME instead.
GALE_GSUB
The subscriptions which should be added to your default subscriptions by gsub. This is the variable normally used to define your default public subscriptions. See also GALE_SUBS. No default. Obsolete in the dangermouse release; see GALE_SUBSCRIBE.
GALE_ID
Your default gale address. If you set this, make sure that you have (or can generate) a key for the address you specify. This variable defaults to your username in GALE_DOMAIN, which is usually correct. GALE_ID sometimes comes in handy to adopt the same Gale address across several login accounts, or to adopt an alternate persona.
GALE_LINKS
The remote server your local server should connect to for undirected public categories. Not set by default. Obsolete in the dangermouse release.
GALE_NAME
The "friendly name" used to identify yourself in Gale messages, usually your real name (as opposed to your username, which is generally an abbreviation). The default is the name contained in your key; run "gkinfo myname@mydomain" to see it. Your key's name, in turn, is set by default to your system "real name" (from the GECOS field) when you first use Gale and generate a key.
GALE_PRESENCE
The default presence string reported by gsub. Your presence string indicates your state to other users; it's set to "in/present" by default, but you can change this to informative messages like "in/at/work", "out/to/lunch", or whatever. It will be reported in your login notices and receipts.
GALE_PROXY
The hostname of the server your clients should connect to. Normally clients can determine the hostname of their server from GALE_DOMAIN, but occasionally circumstances merit the choice of a different server. This is generally set in the system-wide configuration file, if at all.
GALE_SUBS
The default subscriptions used by gsub. If not set, defaults to just your personal messages. If you do set this, you will not receive personal messages unless you specifically include your personal category. Either way, the subscriptions (if any) specified in GALE_GSUB and on the gsub command line are both added to these subscriptions. You probably want to leave this variable alone and use GALE_GSUB instead. Obsolete in the NWO; see GALE_SUBSCRIBE.
GALE_SUBSCRIBE
The default subscriptions used by NWO gsub in the form of a space-separated list of locations. If not set, defaults to just your personal messages. If you do set this, you will not receive personal messages unless you specifically include your personal location (e.g., user@dom.ain). Either way, the subscriptions (if any) specified on the gsub command line are added to these subscriptions.
GALE_SYS_DIR
By default, Gale programs look for system-wide configuration files, keys, and other data in the "etc/gale" directory under the prefix where Gale was installed. This variable allows the use of a different system directory.