C-Kermit 7.1 Case Study #20

[ Previous ] [ Next ] [ Index ] [ C-Kermit Home ] [ Kermit Home ]

Article: of comp.protocols.kermit.misc
From: dallasii@surfree.com (Dallas E. Legan)
Subject: Case Study #20: Lynx/Kermit Coordination Part I
Date: Tue, 23 Jan 2001 05:59:14 -0800

Lynx/Kermit Coordination Part I

The version of ckermit2.txt that I currently have, (http://www.columbia.edu/kermit/ckermit2.html#x1.3.2) in the Lynx section on invoking C-Kermit from your browser (1.3.2) it states that 'As far as we know, this can be done only at compile time.' If you consider what happens when you hit return to be 'invoking', strictly speaking this is true. If your version of Lynx is compiled with general External support, however, in your /etc/lynx.cfg file there should be some lines like:

  #***Must be compiled with USE_EXTERNALS to enable EXTERN ***
  KEYMAP:.:EXTERN                # Run external program with url
  #   or possibly:
  KEYMAP:,:EXTERN         # run EXTERNAL with URL.  added by d.e.l.

Make sure one of these is uncommented (no preceding "#"), or add the lines if necessary. These should be located in a general set of Keymaps, with a lot of other similar statements. The defaults may be commented out.

Later in the file there will be a section called EXTERNAL. (Note that it is 'EXTERN' in the Keymap section, but the commands are assigned in the 'EXTERNAL' section.)

There you should have some lines:

  #  Where FTP is created by:
  #  ln -s  kermit  FTP
  #  when kermit is C-Kermit 7.1+
  EXTERNAL:http:wget -P ~/download -q %s &:TRUE
  #  This could even be another browser for HTTPs, instead of wget
  EXTERNAL:telnet:kermit -J %s:TRUE
  EXTERNAL:iksd:kermit  %s:1649 :TRUE
  #  (or)
  EXTERNAL:iksd:IKSget  %s & :TRUE

The only ones needed for running kermit are the 'USE_EXTERNALS:TRUE' and the lines with kermit, iksd or FTP in them. The other, I include simply to show a typical other external program that could be defined. Again, make sure that there is no preceding '#' on the line that would comment it out and render the line inoperative.

Now, when you hit return at a focused link, the default behavior of Lynx will result as typical - for instance if a 'telnet://aztec2.asu.edu' link the conventional and less capable telnet program will be invoked. If however, you hit "." (or whatever you chose in the Keymap statement), C-Kermit will be invoked instead. (Similarly, over an http link, "." will in the case shown above invoke the wget program on an http URL.) Rather than a binary executable, the program specified by the EXTERNAL statement can be a shebang script (#!/path/interpreter on line 1), that could present a menu of options on how to handle the URL it is passed. This is possible because of how UNIX invokes external programs giving shebang scripts pretty much equality with binary executables. (Another possibility might be Frank da Cruz's 'IKSget' script.) My personal experience is t