lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Re: STARTFILE patch


From: Klaus Weide
Subject: Re: lynx-dev Re: STARTFILE patch
Date: Tue, 13 Apr 1999 09:58:46 -0500 (CDT)

Commenting on patch that's now in 2.8.2dev.22:

On Fri, 2 Apr 1999, Philip Webb wrote:

> so having sorted out those preliminaries,
> i have been able to tackle the original problem,
> which was to have a better default STARTFILE for ordinary users,
> who may find l.b.o. down for some reason.
> i hope the warning for anonymous sites is ok (Henry?):
> if  lynx.cfg  offers  > 1  STARTFILE , Lynx uses the last one found,
> so this is failsafe, if the sysadmin forgets to comment out the regular line.
> 
> *** old/lynx.cfg Fri Mar  5 14:47:43 1999
> --- new/lynx.cfg Fri Apr  2 14:53:49 1999
> ***************
> *** 33,47 ****
>   #       ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system
>   #and now your own tweaks.
>   
>   #
> ! # STARTFILE is the default URL if none is specified on the command line
> ! # or via a WWW_HOME environment variable.
> ! # Note:  these files can be remote (http://www.w3.org/default.html)
> ! # or local (file://localhost/PATH_TO/FILENAME
> ! #  replace PATH_TO with the complete path to FILENAME
> ! #  use Unix SHELL syntax and include the device on VMS systems)
> ! #
> ! STARTFILE:http://lynx.browser.org/
>   
>   # HELPFILE must be defined as a URL and must have a
>   # complete path if local:
> --- 33,54 ----
>   #       ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system
>   #and now your own tweaks.
>   
> + # STARTFILE is the default starting URL if none is specified
> + #   on the command line or via a WWW_HOME environment variable;
> + #   Lynx will refuse to start without a starting URL of some kind.
> + # STARTFILE can be remote, e.g. http://www.w3.org/default.html ,
> + #                or local, e.g. file://localhost/PATH_TO/FILENAME ,
> + #           where PATH_TO is replaced with the complete path to FILENAME
> + #           using Unix shell syntax and including the device on VMS.
> + # The default offered for ordinary users is their current directory:
> + STARTFILE:.

This change flies in the face of what the documentation says, including the
comments just above it.  "." is not a URL!

More generally, there are quite a few places
  - in userdefs.h
  - in lynx.cfg
  - in ynx_url_support.html

that say that something "must" be a URL.

!! URLs are not filenames.  Filenames are not URLs. !!

Also a local file URL is not just a filename prefixed with
"file://localhost".  And a local filename is not just a file: URL
stripped of the initial ""file://localhost".  That happens to be
true only sometimes, and then only for some OSs.

Some of the "must"s are not technically required.  They should
probably be replaced by "should"s.  This applies for everything
that lynx passes through a pair of

            LYFillLocalFileURL(...);
            LYEnsureAbsoluteURL(...);

calls: at least startfile, homepage, 'g'/'G' URLs.  Lynx tries
to convert those things to URLs if they aren't already.  It's
described in lynx_url_support.html, in the section from

   "When entering a URL on the command line....."
to
    "These expansions are SOLELY for startfile or 'g'oto entries!"

but the "SOLELY" may not be true any more(??).  Anyway, something
like "/home/myname/" or "." is not a URL in terms of
lynx_url_support.html, no matter how you slice it.  Putting
'note: STARTFILE must be a URL' directly followed by
'#define STARTFILE "."' in userdefs.h just increases the confusion.

To *decrease* the confusion, it should be stated clearly what is what:
what kind of object is expected by each lynx.cfg option, userdefs.h
#define, etc.  There are at least three kinds of objects:

 - 'real' (absolute) URLs
 - the tentative URLs mentioned above.  Let's give them a name for
   reference.  Say U-URL (user URL), or something.  lynx_url_support.html
   should document what forms are acceptable, in addition to strict 'real'
   URLs.   lynx.cfg, userdefs.h, 'g'oto help should say where a U-URL is
   allowed.
 - filenames.  Things that aren't converted to URLs at all.

This is only a broad classification.  Some filenames are further treated
specially (like bookmark files, sometimes they are supposed to start with
'./' where '.' stands for the home dir).  The VMS code defines a 'Unix
syntax' even for most (all?) non-URL filenames.  Windows/DOS code may
accept Unix form for some filenames.  And so on...

    ----

The patch (without doc changes) increases the discrepancy between
documentation and reality, but I also question its usefulness.
Is it a good thing to start with browsing the *current* directory
by default?  I guess Philip got tired of seeing all the problems
people are having with lynx refusing to start, but in most cases this
change just hides or defers the problem.  In most cases (I assume)
people *want* to make a network connection.   So now they'll see Lynx
start up and not exit immediately, but if there network is somehow
misconfigured they still can't go anywhere; and if the problem is
just that they haven't configured lynx (when they would want to), it
also doesn't help much.

Anyway, I suggest it would be better to at least start with the
user's home directory by default, instead of '.'.  Also, this
can be specified in URL form: "file://localhost/~/" should work.

>   #
> ! # *** NBB *** System administrators with ANONYMOUS USERS !!!
> ! #   set STARTFILE to a REMOTE FILE by uncommenting the next line:
> ! #STARTFILE:http://lynx.browser.org/
> ! #   and commenting out the default offered above;
> ! #   you may, of course, choose to replace `lynx.browser.org'
> ! #   with another remote/local file which you know to be safe.

It doesn't make much sense to ask system administrators with ANONYMOUS
USERS (them and only them) to set STARTFILE to
"http://lynx.browser.org/";, or to a 'REMOTE FILE'.  Those are probably
exactly the folks who want to point STARTFILE to a specific (probably
local) location.  Not just 'you may', they SHOULD.

OTOH it looks now as if http://lynx.browser.org/ were only suggested
for those administrators with ANONYMOUS USERS, not for others.  It
should be suggested as an laternative for everyone.  Even better, it
should be more strongly suggested that folks actually change STARTFILE
to *what they want*.

  ----

About the sentence:

> + #   Lynx will refuse to start without a starting URL of some kind.

It isn't actually possible to *not* have a starting URL of some kind.
There's the userdefs.h default, lynx can't even be compiled without
it (as you have noticed); so this doesn't make sense.


   Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]