Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

lynx -cfg=cfg.file $URL

this works with the following contents of the .cfg file:

SET_COOKIES:TRUE
ACCEPT_ALL_COOKIES:TRUE
PERSISTENT_COOKIES:TRUE
COOKIE_FILE:cookie.file

however, this does not:

lynx -cookies=1 -accept_all_cookies=1 -cookie_file=cookie.file $URL

if it's going to be of any help - here's the trace:

parse_arg(arg_name=-cookies=1, mask=1, count=2)
parse_arg lookup(cookies=1)
...skip (mask 1/4)
parse_arg(arg_name=-accept_all_cookies=1, mask=1, count=3)
parse_arg lookup(accept_all_cookies=1)
...skip (mask 1/4)
parse_arg(arg_name=-cookie_file=cookie.file, mask=1, count=4)
parse_arg lookup(cookie_file=cookie.file)
...skip (mask 1/4)
parse_arg(arg_name=$URL, mask=1, count=5)
parse_arg startfile:$URL

obvious question, why? the actual difference, from what i see, is the inability to trigger "PERSISTENT_COOKIES:TRUE" by command-line options in lynx. or, maybe, i have overlooked/misunderstood something?

share|improve this question
1  
yes, indeed, i have verified that the issue is only related to that one setting, as this seems to work just fine: lynx -cfg=dupe.cfg -cookies -accept_all_cookies -cookie_file=cookie.file $URL, the only thing "dupe.cfg" contains is "PERSISTENT_COOKIES:TRUE". however, my question still remains - how does one activate this setting via the command line? – XXL Jul 24 '11 at 15:26
    
great Q - +1 in hopes of finding you an answer. – mjb Jul 24 '11 at 16:20
up vote 1 down vote accepted

The following document implies that you can get this behavior by compiling Lynx with the --enable-persistent-cookies flag. The behavior is disabled by default, but implied to be enabled with this configuration flag.

You can use checkinstall or similar to easily create a package for your system from source.

Source: http://lynx.isc.org/release/lynx2-8-7/lynx_help/Lynx_users_guide.html#Cookies

share|improve this answer

Try setting -cookie_save_file to the same file.

share|improve this answer
    
unfortunately, this didn't solve the issue for me. – XXL Jul 30 '12 at 10:29

You must log in to answer this question.

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