Debian Codegraph @

lynx_help/keystrokes/environments.html

raw symbols SCIP
1 <!-- $LynxId: environments.html,v 1.23 2025/07/30 23:38:53 tom Exp $ -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
3 <html>
4 <head>
5 <meta name="generator" content=
6 "HTML Tidy for HTML5 for Linux version 5.6.0">
7 <title>Help on Lynx's Environment variables</title>
8 <link rel="author" href="mailto:[email protected]">
9 <meta http-equiv="Content-Type" content=
10 "text/html; charset=us-ascii">
11 <meta name="description" content=
12 "Describes environment variables used by Lynx. Some are specific to Lynx, others are common with similar programs.">
13 </head>
14 <body>
15 <div class="nav">
16 <ul>
17 <li><a href="#overview">Environment Variables</a></li>
18
19 <li><a href="#env">Variables Used By Lynx</a></li>
20
21 <li><a href="#setenv">Variables Set or Modified By Lynx</a></li>
22
23 <li><a href="#cgi">Simulated CGI Support</a></li>
24
25 <li><a href="#language">Native Language Support</a></li>
26
27 <li><a href="#proxy">Proxy details and examples</a></li>
28
29 <li><a href="#dos">Win32 (95/NT) and 386 DOS</a></li>
30 </ul>
31 </div>
32
33 <h2><a name="overview" id="overview">Environment Variables</a></h2>
34
35 <pre>
36 In addition to various &ldquo;standard&rdquo; environment variables
37 such as HOME, PATH, USER, DISPLAY, TMPDIR, etc, <strong>Lynx</strong> utilizes
38 several <strong>Lynx</strong>-specific environment variables, <a href="#env">if they exist</a>.
39
40 Others may be created or modified by <strong>Lynx</strong> to pass data to
41 an external program, or for other reasons. These are
42 listed separately <a href="#setenv">below</a>.
43
44 See also the sections on <a href=
45 "#cgi">Simulated CGI Support</a> and
46 <a href="#language">Native Language Support</a>, below.
47
48 Note: Not all environment variables apply to all types of
49 platforms supported by <strong>Lynx</strong>, though most do. Feedback on
50 platform dependencies is solicited. See also <a href=
51 "#dos">win32/dos</a> specific
52 variables.
53 </pre>
54 <h2><a name="env" id="env">Variables Used By Lynx</a></h2>
55
56 <pre>
57 COLORTERM
58 If set, color capability for the terminal
59 is forced on at startup time. The actual
60 value assigned to the variable is ignored.
61 This variable is only meaningful if <strong>Lynx</strong>
62 was built using the slang screen-handling
63 library.
64
65 LYNX_CFG
66 This variable, if set, will override
67 the default location and name of the
68 global configuration file (normally,
69 lynx.cfg) that was defined by the
70 LYNX_CFG_FILE constant in the
71 userdefs.h file, during installation.
72 See the userdefs.h file for more
73 information.
74
75 LYNX_HELPFILE
76 If set, this variable overrides the
77 compiled-in URL and configuration file
78 URL for the <strong>Lynx</strong> help file.
79
80 LYNX_LOCALEDIR
81 If set, this variable overrides the
82 compiled-in location of the locale
83 directory which contains native lan-
84 guage (NLS) message text.
85
86 LYNX_LSS
87 This variable, if set, specifies the
88 location of the default <strong>Lynx</strong> character
89 style sheet file. [Currently only
90 meaningful if <strong>Lynx</strong> was built using
91 experimental color style support.]
92
93 LYNX_SAVE_SPACE
94 This variable, if set, will override
95 the default path prefix for files
96 saved to disk that is defined in the
97 lynx.cfg SAVE_SPACE: statement. See
98 the lynx.cfg file for more information.
99
100 LYNX_TEMP_SPACE
101 This variable, if set, will override
102 the default path prefix for temporary
103 files that was defined during installation,
104 as well as any value that may
105 be assigned to the TMPDIR variable.
106
107 LYNX_TRACE
108 If set, causes <strong>Lynx</strong> to write a trace
109 file as if the -trace option were sup-
110 plied.
111
112 LYNX_TRACE_FILE
113 If set, overrides the compiled-in name
114 of the trace file, which is either
115 Lynx.trace or LY-TRACE.LOG (the latter
116 on the DOS platform). The trace file
117 is in either case relative to the home
118 directory.
119
120 MAIL
121 This variable specifies the default
122 inbox <strong>Lynx</strong> will check for new mail, if
123 such checking is enabled in the
124 lynx.cfg file.
125
126 NEWS_ORGANIZATION
127 This variable, if set, provides the
128 string used in the Organization:
129 header of USENET news postings. It will
130 override the setting of the ORGANIZATION
131 environment variable, if it is also set
132 (and, on UNIX, the contents of an
133 /etc/organization file, if present).
134
135 NNTPSERVER
136 If set, this variable specifies the
137 default NNTP server that will be used
138 for USENET news reading and posting
139 with <strong>Lynx</strong>, via news: URL's.
140
141 ORGANIZATION
142 This variable, if set, provides the
143 string used in the Organization:
144 header of USENET news postings. On
145 UNIX, it will override the contents of
146 an /etc/organization file, if present.
147
148 <em>PROTOCOL</em>_proxy
149 <strong>Lynx</strong> supports the use of proxy servers
150 that can act as firewall gateways and
151 caching servers. They are preferable
152 to the older gateway servers (see
153 WWW_access_GATEWAY, below).
154 Each protocol used by <strong>Lynx</strong> (http, ftp,
155 gopher, etc), can be mapped separately
156 by setting environment variables of
157 the form <em>PROTOCOL</em>_proxy (literally:
158 http_proxy, ftp_proxy, gopher_proxy,
159 etc), to &ldquo;http://some.server.dom:port/&rdquo;.
160 See <a href=
161 "#proxy">Proxy details and examples</a>.
162
163 WWW_<em>access</em>_GATEWAY
164 <strong>Lynx</strong> still supports use of gateway
165 servers, with the servers specified
166 via &ldquo;WWW_<em>access</em>_GATEWAY&rdquo; variables
167 (where &ldquo;access&rdquo; is lower case and can
168 be &ldquo;http&rdquo;, &ldquo;ftp&rdquo;, &ldquo;gopher&rdquo; or &ldquo;wais&rdquo;),
169 however most gateway servers have been
170 discontinued. Note that you do not
171 include a terminal &ldquo;/&rdquo; for gateways,
172 but do for proxies specified by <em>PROTOCOL</em>_proxy
173 environment variables. See <a href=
174 "#proxy">Proxy details</a>.
175
176 WWW_HOME
177 This variable, if set, will override
178 the default startup URL specified in
179 any of the <strong>Lynx</strong> configuration files.
180 </pre>
181 <h2><a name="setenv" id="setenv">Variables Set or Modified By
182 Lynx</a></h2>
183
184 <pre>
185 LYNX_PRINT_DATE This variable is set by the <strong>Lynx</strong>
186 p(rint) function, to the &ldquo;Date:&rdquo; string
187 seen in the document's &ldquo;Information
188 about&rdquo; 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 &ldquo;No Date&rdquo; under VMS.
195
196 LYNX_PRINT_LASTMOD This variable is set by the <strong>Lynx</strong>
197 p(rint) function, to the Last Mod:
198 string seen in the document's &ldquo;Information
199 about&rdquo; page (= cmd), if any.
200 It is created for use by an external
201 program, as defined in a lynx.cfg
202 PRINTER: definition statement. If the
203 field does not exist for the document,
204 the variable is set to a null string
205 under UNIX, or &ldquo;No LastMod&rdquo; under VMS.
206
207 LYNX_PRINT_TITLE This variable is set by the <strong>Lynx</strong>
208 p(rint) function, to the Linkname:
209 string seen in the document's &ldquo;Information
210 about&rdquo; page (= cmd), if any.
211 It is created for use by an external
212 program, as defined in a lynx.cfg
213 PRINTER: definition statement. If the
214 field does not exist for the document,
215 the variable is set to a null string
216 under UNIX, or &ldquo;No Title&rdquo; under VMS.
217
218 LYNX_PRINT_URL This variable is set by the <strong>Lynx</strong>
219 p(rint) function, to the URL: string
220 seen in the document's &ldquo;Information
221 about&rdquo; page (= cmd), if any. It is
222 created for use by an external program,
223 as defined in a lynx.cfg
224 PRINTER: definition statement. If the
225 field does not exist for the document,
226 the variable is set to a null string
227 under UNIX, or &ldquo;No URL&rdquo; under VMS.
228
229 LYNX_VERSION This variable is always set by <strong>Lynx</strong>,
230 and may be used by an external program
231 to determine if it was invoked by
232 <strong>Lynx</strong>. See also the comments in the
233 distribution's sample mailcap file,
234 for notes on usage in such a file.
235
236 SSL_CERT_DIR Set to the directory containing trusted
237 certificates.
238
239 SSL_CERT_FILE Set to the full path and filename for
240 your file of trusted certificates.
241
242 TERM Normally, this variable is used by
243 <strong>Lynx</strong> to determine the terminal type
244 being used to invoke <strong>Lynx</strong>. If, however,
245 it is unset at startup time (or
246 has the value &ldquo;unknown&rdquo;), or if the
247 -term command-line option is used,
248 <strong>Lynx</strong> will set or modify its value
249 to the user specified terminal type
250 (for the <strong>Lynx</strong> execution environment).
251 Note: If set/modified by <strong>Lynx</strong>, the values of
252 the LINES and/or COLUMNS environment
253 variables may also be changed.
254 </pre>
255 <h2><a name="cgi" id="cgi">Simulated CGI Support</a></h2>
256
257 <p>If built with the cgi-links option enabled,
258 <strong>Lynx</strong> allows access to a cgi script directly
259 without the need for an http daemon.</p>
260
261 <p>When executing such &ldquo;lynxcgi scripts&rdquo; (if
262 enabled), the following variables may be set for simulating a CGI
263 environment:</p>
264
265 <pre>
266 CONTENT_LENGTH
267
268 CONTENT_TYPE
269
270 DOCUMENT_ROOT
271
272 HTTP_ACCEPT_CHARSET
273
274 HTTP_ACCEPT_LANGUAGE
275
276 HTTP_USER_AGENT
277
278 PATH_INFO
279
280 PATH_TRANSLATED
281
282 QUERY_STRING
283
284 REMOTE_ADDR
285
286 REMOTE_HOST
287
288 REQUEST_METHOD
289
290 SERVER_SOFTWARE
291 </pre>
292 <p>Other environment variables are not inherited by the script,
293 unless they are provided via a LYNXCGI_ENVIRONMENT statement in
294 the configuration file. See the lynx.cfg file, and the (draft)
295 CGI 1.1 Specification
296 &lt;http://Web.Golux.Com/coar/cgi/draft-coar-cgi-v11-00.txt&gt;
297 for the definition and usage of these variables.</p>
298
299 <p>The CGI Specification, and other associated documentation,
300 should be consulted for general information on CGI script
301 programming.</p>
302
303 <h2><a name="language" id="language">Native Language Support</a></h2>
304
305 <p>If configured and installed with Native Language Support,
306 <strong>Lynx</strong> will display status and other messages in
307 your local language. See the file ABOUT_NLS in the source
308 distribution, or at your local GNU site, for more information
309 about internationalization.</p>
310
311 <p>The following environment variables may be used to alter
312 default settings:</p>
313
314 <pre>
315 LANG This variable, if set, will override
316 the default message language. It is
317 an ISO 639 two-letter code identifying
318 the language. Language codes are NOT
319 the same as the country codes given in
320 ISO 3166.
321
322 LANGUAGE This variable, if set, will override
323 the default message language. This is a
324 GNU extension that has higher priority for
325 setting the message catalog than LANG or
326 LC_ALL.
327
328 LC_ALL and
329
330 LC_MESSAGES These variables, if set, specify the
331 notion of native language formatting
332 style. They are POSIXly correct.
333
334 LINGUAS This variable, if set prior to configuration,
335 limits the installed languages to specific values.
336 It is a space-separated list of two-letter codes.
337 Currently, it is hard-coded to a wish list.
338
339 NLSPATH This variable, if set, is used as the
340 path prefix for message catalogs.
341 </pre>
342 <h2><a name="proxy" id="proxy">Proxy details and examples</a></h2>
343
344 <p>To set your site's NTTP server as the default host for news
345 reading and posting via <strong>Lynx</strong>, set the
346 environment variable NNTPSERVER so that it points to its Internet
347 address. The variable &ldquo;NNTPSERVER&rdquo; is used to specify
348 the host which will be used as the default for news URLs.</p>
349
350 <dl>
351 <dt>UNIX</dt>
352
353 <dd>
354 <pre>
355 setenv NNTPSERVER "news.server.dom"
356 </pre>
357 </dd>
358
359 <dt>VMS</dt>
360
361 <dd>
362 <pre>
363 define/system NNTPSERVER "news.server.dom"
364 </pre>
365 </dd>
366 </dl>
367
368 <p><strong>Lynx</strong> still supports use of gateway servers,
369 with the servers specified via the variables
370 &ldquo;WWW_access_GATEWAY&rdquo;, where &ldquo;access&rdquo; is
371 lower case and can be &ldquo;http&rdquo;, &ldquo;ftp&rdquo;,
372 &ldquo;gopher&rdquo; or &ldquo;wais&rdquo;. Most of the gateway
373 servers have been discontinued, but
374 &ldquo;http://www.w3.org:8001&rdquo; is available for wais
375 searches (note that you do not include a terminal &ldquo;/&rdquo;
376 for gateways, but do for proxies; see below).</p>
377
378 <p><strong>Lynx</strong> version 2.2 and beyond supports the use
379 of proxy servers that can act as firewall gateways and caching
380 servers. They are preferable to the older gateway servers. Each
381 protocol used by <strong>Lynx</strong> can be mapped separately
382 using <em>PROTOCOL</em>_proxy environment variables as shown
383 below:</p>
384
385 <dl>
386 <dt>UNIX</dt>
387
388 <dd>
389 <blockquote>
390 <pre>
391 setenv http_proxy "http://some.server.dom:port/"
392 setenv https_proxy "http://some.server.dom:port/"
393 setenv ftp_proxy "http://some.server.dom:port/"
394 setenv gopher_proxy "http://some.server.dom:port/"
395 setenv news_proxy "http://some.server.dom:port/"
396 setenv newspost_proxy "http://some.server.dom:port/"
397 setenv newsreply_proxy "http://some.server.dom:port/"
398 setenv snews_proxy "http://some.server.dom:port/"
399 setenv snewspost_proxy "http://some.server.dom:port/"
400 setenv snewsreply_proxy "http://some.server.dom:port/"
401 setenv nntp_proxy "http://some.server.dom:port/"
402 setenv wais_proxy "http://some.server.dom:port/"
403 setenv finger_proxy "http://some.server.dom:port/"
404 setenv cso_proxy "http://some.server.dom:port/"
405 </pre>
406 </blockquote>
407 </dd>
408
409 <dt>VMS</dt>
410
411 <dd>
412 <blockquote>
413 <pre>
414 define "http_proxy" "http://some.server.dom:port/"
415 define "https_proxy" "http://some.server.dom:port/"
416 define "ftp_proxy" "http://some.server.dom:port/"
417 define "gopher_proxy" "http://some.server.dom:port/"
418 define "news_proxy" "http://some.server.dom:port/"
419 define "newspost_proxy" "http://some.server.dom:port/"
420 define "newsreply_proxy" "http://some.server.dom:port/"
421 define "snews_proxy" "http://some.server.dom:port/"
422 define "snewspost_proxy" "http://some.server.dom:port/"
423 define "snewsreply_proxy" "http://some.server.dom:port/"
424 define "nntp_proxy" "http://some.server.dom:port/"
425 define "wais_proxy" "http://some.server.dom:port/"
426 define "finger_proxy" "http://some.server.dom:port/"
427 define "cso_proxy" "http://some.server.dom:port/"
428 </pre>
429 </blockquote>
430
431 <p>(Encase *BOTH* strings in double-quotes to maintain lower
432 case for the <em>PROTOCOL</em>_proxy variable and for the
433 http access type; include /system if you want proxying for
434 all clients on your system.)</p>
435 </dd>
436 </dl>
437
438 <p>If you wish to override the use of a proxy server for specific
439 hosts or entire domains you may use the &ldquo;no_proxy&rdquo;
440 environment variable. The no_proxy variable can be a
441 comma-separated list of strings defining no-proxy zones in the
442 DNS domain name space. If a tail substring of the domain-path for
443 a host matches one of these strings, transactions with that node
444 will not be proxied. Here is an example use of
445 &ldquo;no_proxy&rdquo;:</p>
446
447 <dl>
448 <dt>UNIX</dt>
449
450 <dd>
451 <pre>
452 setenv no_proxy "host.domain.dom, domain1.dom, domain2"
453 </pre>
454 </dd>
455
456 <dt>VMS</dt>
457
458 <dd>
459 <pre>
460 define "no_proxy" "host.domain.dom, domain1.dom, domain2"
461 </pre>
462 </dd>
463 </dl>
464
465 <p>You can include a port number in the no_proxy list to override
466 use of a proxy server for the host accessed via that port, but
467 not via other ports. For example, if you use
468 &ldquo;host.domain.dom:119&rdquo; and/or
469 &ldquo;host.domain.dom:210&rdquo;, then news (port 119) URLs
470 and/or any wais (port 210) searches on that host would be
471 excluded, but http, ftp, and gopher services (if normally
472 proxied) would still be included, as would any news or wais
473 services on other hosts.</p>
474
475 <p>Warning: Note that setting &ldquo;il&rdquo; as an entry in
476 this list will block proxying for the .mil domain as well as the
477 .il domain. If the entry is &ldquo;.il&rdquo; this will not
478 happen.</p>
479
480 <p>If you wish to override the use of a proxy server completely
481 (i.e., globally override any existing proxy variables), set the
482 value of &ldquo;no_proxy&rdquo; to &ldquo;*&rdquo;. This is the
483 only allowed use of * in no_proxy.</p>
484
485 <p>Note that <strong>Lynx</strong> treats file URLs on the local
486 host as requests for direct access to the file, and does not
487 attempt ftp if that fails. It treats both ftp URLs and file URLs
488 on remote hosts as ftp URLs, and does not attempt direct file
489 access for either. If ftp URLs are being proxied, file URLs on a
490 remote host will be converted to ftp URLs before submission by
491 <strong>Lynx</strong> to the proxy server, so no special
492 procedure for inducing the proxy server to handle them is
493 required. Other WWW clients may require that the http server's
494 configuration file have &ldquo;Map file:* ftp:*&rdquo; in it to
495 perform that conversion.</p>
496
497 <p>If you have not set NNTPSERVER, proxy or no_proxy environment
498 variables you can set them at run time via the configuration file
499 lynx.cfg (this will not override external settings).</p>
500
501 <h2><a name="dos" id="dos">Win32 (95/NT) and 386 DOS</a></h2>
502
503 <p>(adapted from &ldquo;readme.txt&rdquo; by Wayne Buttles<br>
504 and &ldquo;readme.dos&rdquo; by Doug Kaufman)</p>
505
506 <p>Here are some environment variables that should be set,
507 usually in a batch file that runs the <strong>Lynx</strong>
508 executable. Make sure that you have enough room left in your
509 environment. You may need to change your &ldquo;SHELL=&rdquo;
510 setting in config.sys. In addition, <strong>Lynx</strong> looks
511 for a &ldquo;SHELL&rdquo; environment variable when shelling to
512 DOS. If you wish to preserve the environment space when shelling,
513 put a line like this in your AUTOEXEC.BAT file also &ldquo;SET
514 SHELL=C:\COMMAND.COM /E:2048&rdquo;. It should match
515 CONFIG.SYS.</p>
516
517 <pre>
518 HOME Where to keep the bookmark file and personal config files.
519 TEMP or TMP Bookmarks are kept here with no HOME. Temp files here.
520 USER Set to your login name
521 LYNX_CFG Set to the full path and filename for lynx.cfg
522 </pre>
523 <p>386 version only:<br></p>
524
525 <pre>
526 WATTCP.CFG Set to the full path for the WATTCP.CFG directory
527 </pre>
528 <p>(Depending on how you compiled libtcp.a, you may have to use
529 WATCONF.)</p>
530
531 <p>Define these in your batch file for running
532 <strong>Lynx</strong>. For example, if your application line is
533 &ldquo;D:\win32\lynx.bat&rdquo;, lynx.bat for Win32 may look
534 like:</p>
535
536 <pre>
537 @ECHO OFF
538 set home=d:\win32
539 set temp=d:\tmp
540 set lynx_cfg=d:\win32\lynx.cfg
541 d:\win32\lynx.exe %1 %2 %3 %4 %5
542 </pre>
543 <p>In lynx_386, a typical batch file might look like:</p>
544
545 <pre>
546 @echo off
547 set HOME=f:/lynx2-8
548 set USER=your_login_name
549 set LYNX_CFG=%HOME%/lynx.cfg
550 set WATTCP.CFG=%HOME%
551 f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9
552 </pre>
553 <p>You will also need to make sure that the WATTCP.CFG file has
554 the correct information for IP number, Gateway, Netmask, and
555 Domain Name Server. This can also be automated in the batch
556 file.</p>
557 </body>
558 </html>