When installing lynx with Homebrew, the primary configuration (according to the lynx option screen) is at a long, version-specific path (thus the path will change every time a new version is installed):


Why isn't the default configuration placed in a normal place like:

  • Isn't /usr/local/Cellar/lynx/2.8.9rel.1/etc/lynx.cfg linked to /usr/local/etc/lynx.cfg? – fd0 Feb 3 '19 at 16:10
  • @fd0: You're right! I didn't notice that. However Lynx shows the long path in the option screen, which is confusing (and ugly!) It's linked this direction: /usr/local/etc/lynx.cfg -> ../Cellar/lynx/2.8.9rel.1/etc/lynx.cfg, so if you edit /usr/local/etc/lynx.cfg, I assume your changes will be gone when you install the next version of Lynx. Do you know what have they been thinking when they decided to do it like this? Is there some user-friendly logic behind the design that I'm missing? – forthrin Feb 3 '19 at 20:29

It's by design. According to the Homebrew homepage:

Homebrew won’t install files outside its prefix and you can place a Homebrew installation wherever you like.

According to the lynx man page:

LYNX_CFG This variable, if set, will override the default location and name of the global configuration file (normally, lynx.cfg) that was defined by the LYNX_CFG_FILE constant in the userdefs.h file, during installation.

In some linux distribution, the constant LYNX_CFG_FILE in set to ~/.lynxrc (as I remember) but in Homebrew this constant is left to its default value. You can check it with brew edit lynx. If you want to change the location of the lynx configuration file, you have, as you tell, to set:

export LYNX_CFG=~/.lynxrc
  • Aha! They should have mentioned the configuration files specifically, because this is not expected by the user. However, I think you are wrong about simply adding ~/.lynxrc. I tried this, and it wasn't until I did export LYNX_CFG=~/.lynxrc that this file took effect. Does it work for you without the environment variable? – forthrin Feb 3 '19 at 11:10
  • Yes, you are totally right. I've modified my answer. – Ortomala Lokni Feb 3 '19 at 12:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .