Console Web Browsers
Summary:- Why Using Console Web Browsers?
- Lynx
- Links
- w3m
Why Using Console Web Browsers?
Even if you spend your Linux time entirely on X and the Window Manager or desktop environment of your choice, there are scenarios where console based web browsers can come in handy:- If your machine isn't beefy enough to support a graphical web browser.
Graphical web browsers are resource hogs, whereas console based browsers are very lightweight (around one or two MB RAM and almost no CPU usage). - If you don't want or can't use X.
If X isn't working and you can't figure out why, it's good to have browser around which allows to look stuff up in the 'Net. If you're like me and start X from the console, you will likely have encountered the situation that you remember you wanted to look up something on the 'Net just after quitting X. Instead of starting X again, use a console browser. - Console browsers are speed monsters.
Nothing beats a console browser in terms of sheer browsing speed. - Quickly transform HTML to ASCII.
All console browser feature an option to convert HTML files to plain text files from the command line (which means you can pipe the ASCII output to other programs for further processing. - You're writing web pages.
Console browsers mercilessly show you if your page design makes sense without graphics. Keep in mind that some people use console browsers because they are the only way for them to access the 'Net. But it's more than that: If your site makes sense in a console browser, it's a very strong sign that it is well structured. And all your visitors will profit from that.
Lynx
The veteran in this category is the Lynx browser (Mandrake Linux package 'lynx'). The most distinguishing 'feature' at the first glance is that Lynx renders horizontal tables vertical. This can be confusing at first, especially if the webmaster relies on tables only to structure their site. On the other this feature guarantees that all of the page's width will fit in a standard terminal window, so you don't have to scroll sideways. Like all console based browsers, you usually start Lynx from a terminal with a destination address as the only argument, e.g. lynx www.slashdot.org In its default mode, you'll find some essential information on navigating at the bottom of the terminal. The first line of terminal displays the title of the current page you've loaded, of how many terminal pages this page consists and on which of those pages you are. A '<<<' in the left hand upper corner is displayed if there's a page in the history you can go back to by using the 'left arrow' key. Configuration There are two system configuration files for Lynx, '/etc/lynx.cfg' and '/etc/lynx.lss'. The latter determines which colors are used for text between certain HTML tags.'lynx.cfg' is abundantly commented. If you want to change some options, copy that file to your home directory, rename it to '~/.lynxrc' and put that line into your '~/.bash_profile' file:
LYNX_CFG=~/.lynxrc; export LYNX_CFG
Notice that you can override these options for a Lynx session by supplying the correct command option. lynx help gives you an overview on them. A further notice on syntax: Lines with '#' in front of them are regarded as comments. Options and their default settings are also commented. In order to change them, you have to remove the '#' in front of them and change the setting (often from TRUE to FALSE or vice versa).
- makes Lynx mouse aware (e.g. you can click with your mouse on links to follow them). If you set this option, you might also be interested in setting
USE_MOUSE:TRUE
to allow for mouse scrolling (Lynx does not support the mouse wheel). Click on the scrollbar below or above the '#' to scroll, clicking on the scrollbar arrows only works very poorly. Lynx will always scroll by one terminal page per click.SCROLLBAR:TRUE
- ,
COOKIE_ACCEPT_DOMAINS:
. By default, Lynx asks you if you want to accept a cookie (a small text file) from a web server. You can change this behavior generally via the optionsCOOKIE_REJECT_DOMAINS:
andSET_COOKIES
. The above options allow you to lists domains from which cookies should automatically accepted or denied.ACCEPT_ALL_COOKIES
Another important cookie related setting iswhich is set to FALSE. This means Lynx will delete all cookies once you terminate the program. This might not be want you want (e.g. for login data for web forums you daily visit).PERSISTENT_COOKIES
- is my absolutely favorite Lynx feature. It allows you to have Lynx number all the links on a page so you can follow these links by just typing the number of the link (
DEFAULT_KEYPAD_MODE
). This makes web browsing really fast.LINKS_ARE_NUMBERED
- lets you configure the amount of information displayed on the bottom of the screen. Default is
DEFAULT_USER_MODE
.NOVICE
is nice because it replaces the help with the URL of the currently selected link (in the other two modes you have to press the <=> key to see the target URL).ADVANCED
- should be set to your favorite text editor. Otherwise the really basic Lynx editor is used, and you don't want that.
DEFAULT_EDITOR
- is set to 'xli'. If you prefer a different image viewer, specify it here.
XLOADIMAGE_COMMAND
- allows you to change the default keybindings for every Lynx command.
KEYMAP
- should be set to TRUE when you're behind a firewall and try in vain to connect to FTP servers with Lynx.
FTP_PASSIVE
Links
Many regard Links (Mandrake Linux package 'links') as the rightful heir to the Lynx browser. It even adds features like proper display of horizontal tables and frames, limited support for ~JavaScript, drop down menus and the latest version even features a basic graphics mode in X (you'll currently have to compile the source yourself if you want that, though). You start Links just like Lynx: links www.slashdot.org Links is by default mouse aware, although it doesn't seem to be possible to scroll using the mouse yet. Keyboard navigation is much like in Lynx. Notice that traversing the page using the 'up' and 'down' keys is a bit tedious if the page consists of horizontal tables, since Links will go through the links of the first column, then through the links of second column, then the third and so on. Lynx' 'number links' feature would do wonders here but regrettably isn't implemented. UseAnother problem caused by table display is that some pages are too wide to fit entirely into a standard 80x40 terminal window. In this case you have to scroll side-ways or resize the terminal window. Links uses the keys { and } for that function, w3m, introduced later on, uses <; and >. Press the
download_dir directory
w3m
w3m (Mandrake Linux package 'w3m') is a console text pager like 'less' which happens to be a web browser, too. The feature set is comparable to that of Links, although some features currently are only available as patches.If you want mouse support, you have to compile the source by yourself, since the Mandrake Linux RPM has been compiled without mouse support. Compiling the source yourself will also allow you access to some interesting experimental features of the latest version like the inline display of web graphics. You start w3m like every other console based browser, e.g. with w3m www.slashdot.org Keyboard navigation is a bit different from the defaults in Lynx and Links. The 'up' and 'down' keys do not jump from link to link but show an 'editor-like' behavior, the 'jump' function is performed by TAB. This makes sense because it allows you to move the cursor from table column to table column with the arrow keys and then use TAB to jump to the link you want. Like Lynx, w3m can execute local CGI without the help of a web server. w3m's settings are configured via an options page (
Related Resources:
Extremely Lynxman lynx
man links
man w3m Revision / Modified: July 9, 2002
Author: Tom Berger Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Console Web Browsers
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:45
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:45
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!

