Re: [elinks-users] elinks.conf file
On Thu, Jul 19, 2012 at 11:10:49AM EDT, Gray, Steve, Wipro wrote: [..] > The reason why I have to use elinks is that I could not get the wget > command to work with zabbix. Did you try ‘curl’, a stable, mature, etc. alternative to wget. Homepage: http://curl.haxx.se It should be packaged by your distro and is often less particular than wget. CJ -- ALL YOUR BASE ARE BELONG TO US! ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users
Re: [elinks-users] elinks.conf file
Hello, 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-boun...@linuxfromscratch.org [mailto:elinks-users-boun...@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 t
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 sources. – 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 $MANPATH. 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 chang
Re: [elinks-users] elinks.conf file
Hello, Although I am using elinks for a particular purpose and nothing else, I would like to get this to work. The script works fine, it just that I can't get that past that elinks config directory problem. 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. Thanks for your help -Original Message- From: elinks-users-boun...@linuxfromscratch.org [mailto:elinks-users-boun...@linuxfromscratch.org] On Behalf Of Fabienne Ducroquet Sent: Friday, July 13, 2012 8:09 PM To: ELinks text WWW browser users mailing list Subject: Re: [elinks-users] elinks.conf file Le vendredi 13 juillet 2012, Gray, Steve, Wipro a écrit : > Hello, Hi, > In my .profile I have the variable ELINKS_CONFDIR set. > "ELINKS_CONFDIR=/opt/tribily/bin/elinks". Is the variable exported to the environment (with "export ELINKS_CONFDIR" or "export ELINKS_CONFDIR=/opt/tribily/bin/elinks" to do everything in one time)? Otherwise it can’t be read from your script. You could also use the -config-dir option of elinks if you don’t need ELINKS_CONFDIR for anything else. > The /opt/tribily/bin/elinks/elinks.conf file has permissions of 777. 666 should suffice since it’s not supposed to be executed anyway (or even 644 for more safety, it is not saved automatically by ELinks so you only need to be able to read it), but you should check the permissions of the /opt/tribily/bin/elinks directory. > I am using elinks in a script that will monitor nginx, i.e. > "/opt/tribily/bin/elinks/src/elinks -source "http://$HOST:$PORT/nginx_status"; > | grep 'Reading' | awk '{print $2}'" If you only want to do that, you can do it with wget, with something like: wget --quiet --output-document=- "http://$HOST:$PORT/nginx_status"; | grep 'Reading' | awk '{print $2}' Well, the command line is not really simpler, but wget only retrieves files, while ELinks has a lot of other features that you are not using anyway. Regards ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users
Re: [elinks-users] elinks.conf file
Le vendredi 13 juillet 2012, Gray, Steve, Wipro a écrit : > Hello, Hi, > In my .profile I have the variable ELINKS_CONFDIR set. > "ELINKS_CONFDIR=/opt/tribily/bin/elinks". Is the variable exported to the environment (with "export ELINKS_CONFDIR" or "export ELINKS_CONFDIR=/opt/tribily/bin/elinks" to do everything in one time)? Otherwise it can’t be read from your script. You could also use the -config-dir option of elinks if you don’t need ELINKS_CONFDIR for anything else. > The /opt/tribily/bin/elinks/elinks.conf file has permissions of 777. 666 should suffice since it’s not supposed to be executed anyway (or even 644 for more safety, it is not saved automatically by ELinks so you only need to be able to read it), but you should check the permissions of the /opt/tribily/bin/elinks directory. > I am using elinks in a script that will monitor nginx, i.e. > "/opt/tribily/bin/elinks/src/elinks -source "http://$HOST:$PORT/nginx_status"; > | grep 'Reading' | awk '{print $2}'" If you only want to do that, you can do it with wget, with something like: wget --quiet --output-document=- "http://$HOST:$PORT/nginx_status"; | grep 'Reading' | awk '{print $2}' Well, the command line is not really simpler, but wget only retrieves files, while ELinks has a lot of other features that you are not using anyway. Regards ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users