[elinks-users] elinks.conf file

Gray, Steve, Wipro steve.gray.wipro at sonymusic.com
Thu Jul 19 08:10:49 PDT 2012

I followed your advice and examples and was able to get elinks to run, and all is okay.  I moved the elinks directory to a more appropriate place, my home directory and I changed my .profile with the correct variables.  Since I did not need an elinks.conf file, although I still can't get man to work, but that is very minor.  I placed the –no-home option in the command and that worked perfectly.   And by the way, I did realize why I got that error 
“ERROR at home.c:149: Unable to find or create ELinks config directory.  Please check if you have $HOME variable set correctly and if you have write permission to your home directory”
Thanks for explaining that to me.

The reason why I have to use elinks is that I could not get the wget command to work with zabbix.  I did follow your example in the earlier email and was able to run wget and I did retrieve data.  I wanted to use that in my UserParameter configuration in zabbix to monitor nginx.  But for some reason zabbix does not like the wget command, which is why I had to go to elinks.  Zabbix has no issues with elinks   I had rather use wget, because we really don’t use elinks for anything else, but with zabbix not supporting wget, I had no choice but to use elinks.
By the way , is there a way to capture the results from elinks and place it in a file.
Sorry to have bothered you and thanks so much for all of the valuable help.

-----Original Message-----
From: elinks-users-bounces at linuxfromscratch.org [mailto:elinks-users-bounces at linuxfromscratch.org] On Behalf Of Fabienne Ducroquet
Sent: Monday, July 16, 2012 2:41 PM
To: ELinks text WWW browser users mailing list
Subject: Re: [elinks-users] elinks.conf file

Le lundi 16 juillet 2012, Gray, Steve, Wipro a écrit :
> Hello,
> I do have my variable exported in my .profile.  Plus, I did try to use 
> the -config-dir option.  In my configuration (along with other stuff), 
> I have --prefix=/opt/tribily/bin/elinks \
>         -config-dir="/opt/tribily/bin/elinks" \
> But I get the error: configure: error: unrecognized option: 
> -config-dir=/opt/tribily/bin/elinks
> Try `./configure --help' for more information.
> And when I run the "./configure --help", there is no information about 
> the "-config-dir" option.  How do I set up that option?  I would like 
> to be in a position where I can use either the wget command or use elinks.

You are confusing different things:
– The compilation options, which you pass to the ./configure script that you run
  before compiling with make.
  They are listed by ./configure --help and --prefix is one of them. Some of
  them (but not --prefix) can also be set in the features.conf file. They are
  used to specify what features you want to enable and where you want to install
  the files created. They are needed only for compilation and installation, you
  don’t need to have access to them afterwards (but you can find what options
  you used by grepping for ./configure in config.log, and if you compile several
  times without running ./configure in between the same options will be used
  each time).
– The runtime options, which you pass to the elinks executable, -config-dir is
  one of them.
  They are documented in elinks’s manpage. Note that the syntax is slightly
  different from that of ./configure options: you have to write -config-dir
  /opt/tribily/bin/elinks, without an equal sign.
– The options stored (by default) in the configuration file elinks.conf, which
  you can edit manually or by using the options manager available in elinks’s
  menu. They are the same as the "Preferences" or "Settings" that you find in
  most graphical programs.

    So to use the -config-dir option you have to add it to the command line in the script, so it becomes (split on several lines for readability):
    /opt/tribily/bin/elinks/src/elinks -config-dir /opt/tribily/bin/elinks \
    -source "http://$HOST:$PORT/nginx_status" \
    | grep 'Reading' | awk '{print $2}

With this you don’t need to set the ELINKS_CONFDIR variable anymore.

    But if I understand correctly, you don’t really need to use that particular configuration directory, you could just let elinks use the default value, it will create a .elinks directory in your $HOME and store some files there. You can even disable that with the -no-home option, because for your usage you don’t need to store bookmarks, history, cookies, etc.

    Actually, you may not need to use --prefix either, since it is only useful when you install the files (with "make install"), and it seems that you are compiling in /opt/tribily/bin/elinks and directly using the executable without installing it. But if I were you, I would rather (assuming you have the necessary permissions):
– Move the whole /opt/tribily/bin/elinks directory elsewhere, because I would
  expect /opt/tribily/bin to contain binary files related to tribily rather than
  the sources of another program, so I’d put this directory directly in /opt, or
  /opt/src, or my home directory if nobody else needs to have access to the
– Configure and compile elinks with --prefix=/opt, or --prefix=/usr/local, or
  --prefix=$HOME if I want to install it for myself only, and install it.
– Check that /opt/bin, or /usr/local/bin, or $HOME/bin, is in the $PATH, and
  that /opt/share/man, or /usr/local/share/man, or $HOME/share/man is in the
    If you do that, you can then use elinks like any other program, without having to tell explicitly to the shell where to find it, so in your script you can replace "/opt/tribily/bin/elinks/src/elinks" with simply "elinks".

    One further remark: I read again the error message you got, which was:
> ERROR at home.c:149: Unable to find or create ELinks config directory. 
> Please check if you have $HOME variable set correctly and if you have 
> write permission to your home directory
    This message means that ELinks was trying to access the $HOME of the user it was running as (the message would have been different if it was trying to access /opt/tribily/bin/elinks), so we can deduce from this:
– that it didn’t have access to the ELINKS_CONFDIR variable; – that it either didn’t find the $HOME, or couldn’t write to it.
    So there must be a problem somewhere, which user is your script running as? 
If it’s you, the $HOME variable must have been modified somewhere, if it’s a user with no $HOME where it can write, then it changes a little what I wrote above (where I assumed that the script was run by a regular user, with a $HOME,
etc.): it can’t access your .profile, $PATH, etc., so if you want to set variables you have to do so in the script or change the system-wide environment, and also in that case it is probably better to use -no-home.

elinks-users mailing list
elinks-users at linuxfromscratch.org

More information about the elinks-users mailing list