1
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 3.0//EN">
4
<title>Help on Environment variables</title>
5
<LINK rev="made" href="mailto:lynx-dev@sig.net">
6
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12
In addition to various "standard" environment variables
13
such as HOME, PATH, USER, DISPLAY, TMPDIR, etc, Lynx utilizes
14
several Lynx-specific environment variables, <a href="#env">if they exist</a>.
16
Others may be created or modified by Lynx to pass data to
17
an external program, or for other reasons. These are
18
listed separately <a href="#setenv">below</a>.
20
See also the sections on <a href="#cgi">SIMULATED CGI SUPPORT</a> and
21
<a href="#language">NATIVE LANGUAGE SUPPORT</a>, below.
23
Note: Not all environment variables apply to all types of
24
platforms supported by Lynx, though most do. Feedback on
25
platform dependencies is solicited. See also <a href="#dos">win32/dos</a> specific
29
Environment Variables Used By Lynx:
32
If set, color capability for the terminal
33
is forced on at startup time. The actual
34
value assigned to the variable is ignored.
35
This variable is only meaningful if Lynx
36
was built using the slang screen-handling
40
This variable, if set, will override
41
the default location and name of the
42
global configuration file (normally,
43
lynx.cfg) that was defined by the
44
LYNX_CFG_FILE constant in the
45
userdefs.h file, during installation.
46
See the userdefs.h file for more
50
If set, this variable overrides the
51
compiled-in location of the locale
52
directory which contains native lan-
53
guage (NLS) message text.
56
This variable, if set, specifies the
57
location of the default Lynx character
58
style sheet file. [Currently only
59
meaningful if Lynx was built using
60
experimental color style support.]
63
This variable, if set, will override
64
the default path prefix for files
65
saved to disk that is defined in the
66
lynx.cfg SAVE_SPACE: statement. See
67
the lynx.cfg file for more information.
70
This variable, if set, will override
71
the default path prefix for temporary
72
files that was defined during installation,
73
as well as any value that may
74
be assigned to the TMPDIR variable.
77
If set, causes Lynx to write a trace
78
file as if the -trace option were sup-
82
If set, overrides the compiled-in name
83
of the trace file, which is either
84
Lynx.trace or LY-TRACE.LOG (the latter
85
on the DOS platform). The trace file
86
is in either case relative to the home
90
This variable specifies the default
91
inbox Lynx will check for new mail, if
92
such checking is enabled in the
96
This variable, if set, provides the
97
string used in the Organization:
98
header of USENET news postings. It will
99
override the setting of the ORGANIZATION
100
environment variable, if it is also set
101
(and, on UNIX, the contents of an
102
/etc/organization file, if present).
105
If set, this variable specifies the
106
default NNTP server that will be used
107
for USENET news reading and posting
108
with Lynx, via news: URL's.
111
This variable, if set, provides the
112
string used in the Organization:
113
header of USENET news postings. On
114
UNIX, it will override the contents of
115
an /etc/organization file, if present.
118
Lynx supports the use of proxy servers
119
that can act as firewall gateways and
120
caching servers. They are preferable
121
to the older gateway servers (see
122
WWW_access_GATEWAY, below).
123
Each protocol used by Lynx (http, ftp,
124
gopher, etc), can be mapped separately
125
by setting environment variables of
126
the form PROTOCOL_proxy (literally:
127
http_proxy, ftp_proxy, gopher_proxy,
128
etc), to "http://some.server.dom:port/".
129
See <a href="#proxy">Proxy details and examples</a>.
132
Lynx still supports use of gateway
133
servers, with the servers specified
134
via "WWW_access_GATEWAY" variables
135
(where "access" is lower case and can
136
be "http", "ftp", "gopher" or "wais"),
137
however most gateway servers have been
138
discontinued. Note that you do not
139
include a terminal '/' for gateways,
140
but do for proxies specified by PROTOCOL_proxy
141
environment variables. See <a href="#proxy">Proxy details</a>.
144
This variable, if set, will override
145
the default startup URL specified in
146
any of the Lynx configuration files.
148
<a name="setenv"><em>
149
Environment Variables Set or Modified By Lynx:
152
LYNX_PRINT_DATE This variable is set by the Lynx
153
p(rint) function, to the Date: string
154
seen in the document's "Information
155
about" page (= cmd), if any. It is
156
created for use by an external program,
157
as defined in a lynx.cfg
158
PRINTER: definition statement. If the
159
field does not exist for the document,
160
the variable is set to a null string
161
under UNIX, or "No Date" under VMS.
163
LYNX_PRINT_LASTMOD This variable is set by the Lynx
164
p(rint) function, to the Last Mod:
165
string seen in the document's "Information
166
about" page (= cmd), if any.
167
It is created for use by an external
168
program, as defined in a lynx.cfg
169
PRINTER: definition statement. If the
170
field does not exist for the document,
171
the variable is set to a null string
172
under UNIX, or "No LastMod" under VMS.
174
LYNX_PRINT_TITLE This variable is set by the Lynx
175
p(rint) function, to the Linkname:
176
string seen in the document's "Information
177
about" page (= cmd), if any.
178
It is created for use by an external
179
program, as defined in a lynx.cfg
180
PRINTER: definition statement. If the
181
field does not exist for the document,
182
the variable is set to a null string
183
under UNIX, or "No Title" under VMS.
185
LYNX_PRINT_URL This variable is set by the Lynx
186
p(rint) function, to the URL: string
187
seen in the document's "Information
188
about" page (= cmd), if any. It is
189
created for use by an external program,
190
as defined in a lynx.cfg
191
PRINTER: definition statement. If the
192
field does not exist for the document,
193
the variable is set to a null string
194
under UNIX, or "No URL" under VMS.
196
LYNX_VERSION This variable is always set by Lynx,
197
and may be used by an external program
198
to determine if it was invoked by
199
Lynx. See also the comments in the
200
distribution's sample mailcap file,
201
for notes on usage in such a file.
203
SSL_CERT_DIR Set to the directory containing trusted
206
SSL_CERT_FILE Set to the full path and filename for
207
your file of trusted certificates.
209
TERM Normally, this variable is used by
210
Lynx to determine the terminal type
211
being used to invoke Lynx. If, however,
212
it is unset at startup time (or
213
has the value "unknown"), or if the
214
-term command-line option is used,
215
Lynx will set or modify its value
216
to the user specified terminal type
217
(for the Lynx execution environment).
218
Note: If set/modified by Lynx, the values of
219
the LINES and/or COLUMNS environment
220
variables may also be changed.
224
SIMULATED CGI SUPPORT
226
If built with the cgi-links option enabled, Lynx allows
227
access to a cgi script directly without the need for an
230
When executing such "lynxcgi scripts" (if enabled), the
231
following variables may be set for simulating a CGI environment:
259
Other environment variables are not inherited by the
260
script, unless they are provided via a LYNXCGI_ENVIRONMENT
261
statement in the configuration file. See the lynx.cfg
262
file, and the (draft) CGI 1.1 Specification
263
<http://Web.Golux.Com/coar/cgi/draft-coar-cgi-v11-00.txt>
264
for the definition and usage of these variables.
266
The CGI Specification, and other associated documentation,
267
should be consulted for general information on CGI script
270
<a name="language"><em>
271
NATIVE LANGUAGE SUPPORT
273
If configured and installed with Native Language Support,
274
Lynx will display status and other messages in your local
275
language. See the file ABOUT_NLS in the source distribution,
276
or at your local GNU site, for more information about
277
internationalization.
279
The following environment variables may be used to alter
282
LANG This variable, if set, will override
283
the default message language. It is
284
an ISO 639 two-letter code identifying
285
the language. Language codes are NOT
286
the same as the country codes given in
289
LANGUAGE This variable, if set, will override
290
the default message language. This is a
291
GNU extension that has higher priority for
292
setting the message catalog than LANG or
297
LC_MESSAGES These variables, if set, specify the
298
notion of native language formatting
299
style. They are POSIXly correct.
301
LINGUAS This variable, if set prior to configuration,
302
limits the installed languages to specific values.
303
It is a space-separated list of two-letter codes.
304
Currently, it is hard-coded to a wish list.
306
NLSPATH This variable, if set, is used as the
307
path prefix for message catalogs.
310
Proxy details and examples:
313
To set your site's NTTP server as the default host for news reading
314
and posting via Lynx, set the environment variable NNTPSERVER so that
315
it points to its Internet address. The variable "NNTPSERVER" is used
316
to specify the host which will be used as the default for news URLs.
319
setenv NNTPSERVER "news.server.dom"
322
define/system NNTPSERVER "news.server.dom"
324
Lynx still supports use of gateway servers, with the servers specified
325
via the variables "WWW_access_GATEWAY", where "access" is lower case
326
and can be "http", "ftp", "gopher" or "wais". Most of the gateway
327
servers have been discontinued, but "http://www.w3.org:8001" is
328
available for wais searches (note that you do not include a
329
terminal '/' for gateways, but do for proxies; see below).
331
Lynx version 2.2 and beyond supports the use of proxy servers that
332
can act as firewall gateways and caching servers. They are
333
preferable to the older gateway servers. Each protocol used by
334
Lynx can be mapped separately using PROTOCOL_proxy environment
335
variables of the form:
338
setenv http_proxy "http://some.server.dom:port/"
339
setenv https_proxy "http://some.server.dom:port/"
340
setenv ftp_proxy "http://some.server.dom:port/"
341
setenv gopher_proxy "http://some.server.dom:port/"
342
setenv news_proxy "http://some.server.dom:port/"
343
setenv newspost_proxy "http://some.server.dom:port/"
344
setenv newsreply_proxy "http://some.server.dom:port/"
345
setenv snews_proxy "http://some.server.dom:port/"
346
setenv snewspost_proxy "http://some.server.dom:port/"
347
setenv snewsreply_proxy "http://some.server.dom:port/"
348
setenv nntp_proxy "http://some.server.dom:port/"
349
setenv wais_proxy "http://some.server.dom:port/"
350
setenv finger_proxy "http://some.server.dom:port/"
351
setenv cso_proxy "http://some.server.dom:port/"
354
define "http_proxy" "http://some.server.dom:port/"
355
define "https_proxy" "http://some.server.dom:port/"
356
define "ftp_proxy" "http://some.server.dom:port/"
357
define "gopher_proxy" "http://some.server.dom:port/"
358
define "news_proxy" "http://some.server.dom:port/"
359
define "newspost_proxy" "http://some.server.dom:port/"
360
define "newsreply_proxy" "http://some.server.dom:port/"
361
define "snews_proxy" "http://some.server.dom:port/"
362
define "snewspost_proxy" "http://some.server.dom:port/"
363
define "snewsreply_proxy" "http://some.server.dom:port/"
364
define "nntp_proxy" "http://some.server.dom:port/"
365
define "wais_proxy" "http://some.server.dom:port/"
366
define "finger_proxy" "http://some.server.dom:port/"
367
define "cso_proxy" "http://some.server.dom:port/"
368
(Encase *BOTH* strings in double-quotes to maintain
369
lower case for the PROTOCOL_proxy variable and for
370
the http access type; include /system if you want
371
proxying for all clients on your system.)
373
If you wish to override the use of a proxy server for specific hosts or
374
entire domains you may use the "no_proxy" environment variable.
375
The no_proxy variable can be a comma-separated list of strings defining
376
no-proxy zones in the DNS domain name space. If a tail substring of the
377
domain-path for a host matches one of these strings, transactions with that
378
node will not be proxied. Here is an example use of "no_proxy":
381
setenv no_proxy "host.domain.dom, domain1.dom, domain2"
384
define "no_proxy" "host.domain.dom, domain1.dom, domain2"
386
You can include a port number in the no_proxy list to override use
387
of a proxy server for the host accessed via that port, but not via
388
other ports. For example, if you use "host.domain.dom:119" and/or
389
"host.domain.dom:210", then news (port 119) URLs and/or any wais
390
(port 210) searches on that host would be excluded, but http, ftp,
391
and gopher services (if normally proxied) would still be included,
392
as would any news or wais services on other hosts.
394
Warning: Note that setting 'il' as an entry in this list
395
will block proxying for the .mil domain as well as the .il domain.
396
If the entry is '.il' this will not happen.
398
If you wish to override the use of a proxy server completely (i.e.,
399
globally override any existing proxy variables), set the value of
400
"no_proxy" to "*". This is the only allowed use of * in no_proxy.
402
Note that Lynx treats file URLs on the local host as requests for
403
direct access to the file, and does not attempt ftp if that fails.
404
It treats both ftp URLs and file URLs on remote hosts as ftp URLs,
405
and does not attempt direct file access for either. If ftp URLs are
406
being proxied, file URLs on a remote host will be converted to ftp
407
URLs before submission by Lynx to the proxy server, so no special
408
procedure for inducing the proxy server to handle them is required.
409
Other WWW clients may require that the http server's configuration
410
file have "Map file:* ftp:*" in it to perform that conversion.
412
If you have not set NNTPSERVER, proxy or no_proxy environment variables
413
you can set them at run time via the configuration file lynx.cfg
414
(this will not override external settings).
417
Win32 (95/NT) and 386 DOS
419
(adapted from "readme.txt" by Wayne Buttles
420
and "readme.dos" by Doug Kaufman)
422
Here are some environment variables that should be set, usually in a
423
batch file that runs the lynx executable. Make sure that you have enough
424
room left in your environment. You may need to change your "SHELL="
425
setting in config.sys. In addition, lynx looks for a "SHELL" environment
426
variable when shelling to DOS. If you wish to preserve the environment
427
space when shelling, put a line like this in your AUTOEXEC.BAT file also
428
"SET SHELL=C:\COMMAND.COM /E:2048". It should match CONFIG.SYS.
430
HOME Where to keep the bookmark file and personal config files.
431
TEMP or TMP Bookmarks are kept here with no HOME. Temp files here.
432
USER Set to your login name
433
LYNX_CFG Set to the full path and filename for lynx.cfg
436
WATTCP.CFG Set to the full path for the WATTCP.CFG directory
437
(Depending on how you compiled libtcp.a, you may have to use WATCONF.)
439
Define these in your batch file for running Lynx. For example, if your
440
application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like:
444
set lynx_cfg=d:\win32\lynx.cfg
445
d:\win32\lynx.exe %1 %2 %3 %4 %5
447
In lynx_386, a typical batch file might look like:
451
set USER=your_login_name
452
set LYNX_CFG=%HOME%/lynx.cfg
453
set WATTCP.CFG=%HOME%
454
f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9
456
You will also need to make sure that the WATTCP.CFG file has the
457
correct information for IP number, Gateway, Netmask, and Domain Name
458
Server. This can also be automated in the batch file.