Re: lynx configuration precedence

Tim Chase <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
On 2019-11-17 19:10, Jude DaShiell wrote:
> If a user has a lynx.cfg file in their home directory or in
> /home/.lynx will lynx automatically use their configuration file
> rather than the system's /etc/lynx.cfg file?

reading through the most recent source release, it looks like it
prefers in the following order the first readable file it finds:

1) if it was passed in via "-cfg=$FILENAME"

2) check if there's an environment variable named LYNX_CFG (or
"lynx_cfg") and use that if possible

3) if USE_PROGRAM_DIR is defined (which it isn't by default) at build
time, look for a "lynx.cfg" in the same directory as the lynx
executible.

4) look for the hard-coded LYNX_CFG_FILE file, as defined in
userdefs.h which is ".\lynx.cfg" on DOS and "/usr/local/lib/lynx.cfg"
on other platforms, assuming it hasn't been set by the ./configure or
Makefile build process.  In this process, according to the source,
you can specify at build-time that the LYNX_CFG_PATH is "~" to make
it a user-specific config file.

But otherwise, it doesn't automatically look for some lynx.cfg file
in the user's $HOME.

> If not, such a modification to lynx in some future version may be
> worth doing.

I've often wished for this and one of the first things I do when
setting up lynx is create an alias that uses `-cfg=$HOME/.lynx.cfg`

It doesn't look like it would be too hard to add a clause in that
chain of places-to-look that would try the home directory as well.

-tim



_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.