SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

October 2002


Lynx on OS/2: Straight Answers and Keen Tricks

Part 1 - Start Using the Lynx Browser

by Dallas E. Legan

Lynx is often my web browser of choice (which you may have gathered from my article last year on Text-Mode Web Browsers for OS/2), in part because it is resource stingy. This might not be a glamorous reason, but it makes the most of resources available whether it is a slow ISP connection, underpowered CPU, poor monitor or whatever. It can be even be used by any old piece of hardware that can function as a terminal which uses a serial connection to a system on which Lynx is running.

Along with this is another strength that appeals to me. Lynx is extremely configurable, having many often surprising capabilities. Part of this is making the most of the resources that are available. I'll try to go into some of these capabilities in this series of articles. Lynx has many modes of operation that allow it to be integrated into scripts (for performing tasks without user supervision), or used in coordination with other software.

Another reason I like Lynx is that it respects the user's privacy. It is fairly configurable in handling cookies, releasing referral page information, and because it only downloads graphics when you decide to view them, "web bugs" used for tracking your browsing are largely ineffective. I've used Lynx running it through the JunkBuster proxy server, and noticed little change in behavior - apparently much of the functionality of JunkBuster is implicit in the way Lynx works. Management guru Peter Drucker stated that, "Nothing is worse than doing more efficiently something that shouldn't be done at all." Generally, Lynx sticks to doing those things that should be done.

This series of articles cover what I think are the most important things for someone to know about Lynx when just starting with it, or things I have actually explained to people that caused them to use it more than they otherwise would. I hope you find it useful.


Where does Lynx come from?

You can find some information on the early history of Lynx at http://www.ku.edu/~grobe/early-lynx.html Originally, it worked with a non-http/html hypertext system developed at the University of Kansas. It then was changed to work with the WWW protocols when they became popular.


Is this just a UNIX program?

No. Lynx has been ported to operating systems and hardware platforms ranging from Amiga and Atari to IBM's OS/390, now known as zSeries mainframes, so it has literally A to Z coverage of computers you can run it on. (You can use it from any piece of hardware that can function as a terminal and make some kind of session connection to a computer that can run Lynx.) I don't know for a fact, but I suspect this is the greatest range of any web browser. Whatever computer you are using in the future, chances are Lynx will be available for it.


Where can I get Lynx?

Hobbes is a good place. While it is probably best to just go to http://hobbes.nmsu.edu and search on 'Lynx', here are some URLs. (If you prefer, you can substiture 'ftp' for 'http' and use your ftp client.):


Does Lynx have any prerequisites to run on OS/2?

Yes, you need to have the EMX runtime installed. If you don't already have it installed, you can find it on Hobbes at http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip While this article doesn't cover EMX runtime installation, you can find some help on installing it in the documentation in the zip file. Also, you need at least one disk partition formatted with a file system such as HPFS that can handle file names more complicated than the FAT-16 DOS standard can handle. JFS, EXT-2, and RAMFS are others that are satisfactory besides HPFS.


What things might I have to adjust to get Lynx to work on OS/2?

Put the following SET statements in a .CMD file to run from a CMD.EXE prompt before starting Lynx. Experiment with them until you get the results you want. If you want to make them "permanent," you can tack them on the end of your CONFIG.SYS file. You might even just

   TYPE  lynxconf.cmd  >>  config.sys
or such.

Note that these SET statements were extracted from a CONFIG.SYS file on one of my systems, and references to "elsewhere" refer to other sections of that CONFIG.SYS file. To make it easier for you, you can download a file of all these SET statements (lynx-set.zip) which you can edit and use.

If you use EMX a lot, you probably already have the following variables defined in your environment and might need to comment/delete these so they don't conflict with what you already use:

SET HOME=C:/HOME
... This variable is used by many EMX programs, and I actually define it elsewhere in my CONFIG.SYS file, just giving a typical example here. Lynx uses this to store the .lynxrc personal configuration/'options' file, .lynxsig mail signature file, and bookmark files.

SET TERMINFO=E:/TCPIP/BIN/_W3M/USER/TERMINFO
... I actually installed the contents of the TERMINFO directory with my w3m web browser installation, but Lynx does come with a set. You may have installed some already with your EMX installation.

SET TERM=ansi.bsc
...I actually set this elsewhere in my CONFIG.SYS but show a typical setting here. It determines what type of terminal emulation is used and must be set to the name of one of the files found in the TERMINFO subdirectories. The TERMINFO directory has subdirectories named 'a','b','c',...'z'.

If you have trouble getting color to work, try one of the 'ansi...' types in the 'a' subdirectory. This also works if you have trouble getting the mouse to function properly - some terminal types don't enable the mouse. With Lynx, with the proper settings in the lynx.cfg file and TERM setting, the mouse will work in full screen mode in OS/2 as well as from a windowed prompt.

SET USER=leganii@surfree.com
This variable is barely mentioned in the Lynx documentation, but is used by many programs originating in UNIX. With Lynx this is used when handling 'mailto:' URLs, and would typically be set to your e-mail address. If this variable is not assigned a value, you will default to an identity of 'os2user@YourMailRelay'.

Make sure the DLL directory packed with Lynx is either in the LIBPATH statement of your CONFIG.SYS, or the contents are copied to a directory listed in LIBPATH statement, or here or elsewhere define either BEGINLIBPATH=... or a ENDLIBPATH=.... statements that include the Lynx DLL directory.

Being as Lynx 2.8.4 only seemed to have one special DLL file, I just copied it over to another directory in my LIBPATH:

SET COLORTERM=
... If set to any value this variable will force Lynx to function in color mode, and it cannot be turned off. No black and white.

The following items might also be used by other EMX programs, but my experience is too limited to say one way or another:

SET WWW_HOME=http://www.scoug.com
...I know this is also used by W3M, the other text browser I like a lot. It simply defines a default page if no URL is given when the browsers are started.

SET MAIL=
...This variable sets the location of a mail inbox directory that if so configured in your LYNX.cfg file, will be checked periodicly to notify you if new mail has arrived.

SET HOMEDRIVE=E:
...This variable seems to define the partition where the Lynx binary is located. If it is not defined, some of the other variable volume specifications, like that for HOME, will be ignored, and the directories they name must be on the same partition as the Lynx.exe executable file. The specification for the 'Jumps' file in lynx.cfg, a sort of fixed content bookmark file also uses this.

SET ORGANIZATION=
...will be over- ridden by NEWS_ORGANIZATION

SET NEWS_ORGANIZATION=Me
...This will show up in the heading of any news posts made with Lynx

SET NNTPSERVER=snews.apol.com.tw
...I found this open news server on the open newserver tracking web site. It is supposed to have the most news groups of any known. This server will be used with NEWS: URLs, to read news. You can still use other news servers by using the NNTP:/// schema.

SET DISPLAY=1
...Under some circumstances, this variable would actually be set to the full path/filename of your image viewing program. My personal experience is that while Lynx 2.8.4 for OS/2 does not use any path/filename specified by this variable, it does need to be defined and seems to provide a simple go/no go permission for image viewing. If it is set to null or undefined, Lynx will try to download image files instead of viewing them.

SET _proxy=http://some.server.com:port/
...These variables - where can be any of the URL schema Lynx can handle - specify any proxy servers Lynx will go through to access the Internet, instead of directly going to the addresses you give. These could be part of a firewall, NAT, caching system and such. If you are behind a proxy based firewall, failure to work with the proxy servers will keep you from accessing any but local pages or files. Incorrectly giving proxy servers when there are none will also cause connection problems.

Some environmental variables are specific to Lynx:

SET LYNX_CFG=E:/TCPIP/ETC/LYNX.CFG
...This variable will define the configuration file Lynx uses. Study this file and change it as needed. Understanding it is key to making Lynx do what you want.

SET LYNX_TEMP_SPACE=i:/tmp
...This scratch directory must be in a partition that allows long, complex file names. If it is not, you will get many error messages indicating Lynx is unable to open temporary files. HPFS, EXT2, JFS, and the RAMFS (search Hobbes) seem to be adequate. Man pages, Lynx.cfg and other notes indicate TMP, TMPDIR, TEMP, TEMPDIR variables can be used in place of this variable, as equivalent names for the scratch space. My experience, however, is that the Lynx 2.8.4 build on Hobbes needs this particular name for the scratch space.

SET LYNX_SAVE_SPACE=i:/tmp
... over rides SAVE_SPACE in .CFG. This variable sets where downloads go by default. Again, this probably cannot be on a simple FAT file system.

SET LYNX_LSS=E:/TCPIP/ETC/LYNX.LSS
...If you do not define this variable, Lynx will try to use a default value, and the file will have to be located there. This file specifies things for the terminal behavior.

SET LYNX_TRACE=
...To turn on tracing, logged in a file.


How do I get help in Lynx?

  • For command line switches, type:
      lynx -help
    
  • While running Lynx, '?', 'h', or 'H' will bring up a help page.
  • 'k' or 'K' will bring up a list of the key/command bindings.
  • 'f' in Directory Editor (DirEd) mode (that is, you are looking at a local directory) will bring up a menu of commands.
  • Double right clicking with the mouse will bring up a menu of commands you can left click on with the mouse.
  • 'o' will bring up the configuration menu for many settings you may frequently want to change.

Always remember you can use the arrow, tab and return keys for navigation if needed. Also, useful files come in your Lynx zip file. You might want to study the various *.doc, lynx.man and readme* files.


Is there a way to test this thing out without installing it?

You might try telneting to some of the links listed at:

http://www.trill-home.com/lynx/public_lynx.html

which has some public Lynx servers. If you have a programmable telnet client like Kermit/2 or ZOC, you might be able to program these clients to do interesting things. On the other hand, these will not allow you to conveniently do image viewing, summon up EXTERNAL commands and other cool things. If you need to do some browsing under emergency recovery conditions, all you need to access these servers is a basic Internet connection of some kind and a telnet client of any kind.

Another alternative is to use an e-mail to www gateway. In many parts of the world, they are lucky to have e-mail access, and they have to make do with what these servers provide. Most of them use Lynx somewhere in the inner workings of the software. Also, I understand this technology is undergoing something of a resurgence with wireless PDA use where mail is relatively easy to get running. To get information on this, get the FAQ for Accessing the Internet by E-Mail mailing list, by sending e-mail to mail-server@rtfm.mit.edu with only this line in the body of the note:

   send usenet/news.answers/internet-services/access-via-email


To be continued... Part 2 addresses questions and solves problems you might encounter after giving Lynx a try.


The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2002 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.