Recently, while I was browsing a website in Firefox, I found that it took forever to load the concerned web page. Blame it on my internet connection or on the condition of the web server hosting the web page, I was literally fed up with the wait and closed the window with disgust. It was during this time that I wondered whether it will make my browsing experience a bit more pleasant if I switched to a console web browser such as lynx.
I am aware of a number of web browsers which have a very low memory foot print and also which discard plenty of fluff - which you find increasingly in websites being built now a days - while displaying web pages. Some of these web browsers being Dillo, Lynx and Links. Dillo is a web browser which require an X server to run. But the other two are console web browsers which display only text.
Links2 is a web browser which is based on 'links' and can be run in two modes. It will display web pages only in text when run in console mode and renders images in a variety of graphics formats such as PNG, Jpeg, Gif, Tiff and Xbm when run in graphics mode from within a X window system.
You have to see it in action to actually fathom how it renders the web pages. I have included a couple of screenshots of web pages as viewed in links2 below.
As you can see from the screenshots, websites which are built using tables are rendered properly where as those which use CSS lose their layout but are still equally readable. This is because links2 does not yet support CSS.
You can install links2 in Debian based Linux distributions by executing the following command :
# apt-get install links2
One of the good things I like about links2 apart from it rendering web pages in the blink of the eye are the number of keyboard shortcuts it supports. Considering that this web browser is also designed to be run in console mode, each and every function can be accessed entirely using the keyboard. Some of the shortcuts I found really convenient are as follows :
- '\' - toggle between viewing the web page and its source code.
- '/' - used to search for a word or term in the website that is displayed.
- [Esc] key - Shows a menu at the top of the browser from which you can also make choices.
- '=' - Provides further information about the web page such as its size, the web server serving the web page and its url.
- '|' - Pipe displays the header information.
- '<- ' - left arrow will take you to the previous view. '->' - right arrow will take you forward to the latest view.
- [Page up] and [Page down] - these keys can be used to navigate through the web page one page at a time. But you can also use [Space bar] and 'b' key combination for the same.
- 'g' - will pop-up a dialog box where you can enter the url of the website you want to view. To open this dialog box with the url of the current page already entered, press 'G'.
- Move the mouse pointer over an image and press 'i' to see only the image.
Starting links2 in graphics mode
To start links2 in graphics mode which is the mode which displays the images, use the '-g' option with the links2 command :
$links2 -gThe above command will probe all the installed graphics drivers and run on the first found. The drivers that are supported in links2 are x, svgalib, fb, directfb, pmshell and atheos. But if you want to start links2 with a specific driver say driver 'x', pass the value to the '-driver' option as follows :
$ links2 -driver xlinks2 also has a lot of other options such as say, you want to save the contents of a webpage to your hard disk. This is easily achieved by using the -dump option as follows :
$ links2 -dump http://news.google.com > news.txt
... which will save the contents of the news.google.com page into the 'news.txt' text file. Which means, using this method you can literally strip all the html elements and save only the text into file. There are a whole lot of command line switches available for links2 from those for changing the foreground and background of the webpage that is viewed to conducting a name lookup of a web address. Check the man page of links2 for more options.
As with all things related to Linux and Unix, links2 web browser also stores all its configuration parameters in a text file. If you look into your home directory, you will find a hidden directory called .links2/ which contain all the files pertaining to the user's configuration. It is in the '.links2' directory that links2 web browser stores details such as your bookmarks, the browsing history and the per user configuration details.
The configuration details are stored in the links.cfg text file which is also created in the same location. This file is automatically created by links2 when you make changes to the configuration of the web browser and need not be edited manually by the user. But it is interesting to see the data that is entered in this file. My links.cfg file shows the following details :
# FILE: ~/.links2/links.cfg
# This file is automatically generated by Links -- please do not edit.
extension "aif,aiff,aifc" "audio/x-aiff"
extension "au,snd" "audio/basic"
extension "avi" "video/x-msvideo"
extension "deb" "application/x-debian-package"
extension "dl" "video/dl"
extension "dxf" "application/dxf"
extension "dvi" "application/x-dvi"
extension "fli" "video/fli"
extension "g" "application/brlcad"
extension "gbr" "application/gerber"
extension "gif" "image/gif"
extension "gl" "video/gl"
extension "grb" "application/gerber"
extension "jpg,jpeg,jpe" "image/jpeg"
extension "mid,midi" "audio/midi"
extension "mpeg,mpg,mpe" "video/mpeg"
extension "pbm" "image/x-portable-bitmap"
extension "pcb" "application/pcb"
extension "pdf" "application/pdf"
extension "pgm" "image/x-portable-graymap"
extension "pgp" "application/pgp-signature"
extension "png" "image/png"
extension "pnm" "image/x-portable-anymap"
extension "ppm" "image/x-portable-pixmap"
extension "ppt" "application/powerpoint"
extension "ps,eps,ai" "application/postscript"
extension "qt,mov" "video/quicktime"
extension "ra,rm,ram" "audio/x-pn-realaudio"
extension "rtf" "application/rtf"
extension "sch" "application/gschem"
extension "svg" "image/svg"
extension "swf" "application/x-shockwave-flash"
extension "sxw" "application/x-openoffice"
extension "tga" "image/targa"
extension "tiff,tif" "image/tiff"
extension "wav" "audio/x-wav"
extension "xbm" "image/x-xbitmap"
extension "xls" "application/excel"
extension "xpm" "image/x-xpixmap"
video_driver "x" "1024x675" "" ISO-8859-1
I found this web browser really sleek and easy to use. Considering that it renders graphic images without any problem when run in X windows, this could easily be a good replacement for the mainstream web browsers where one is concerned only in reading the content of a website without the usual distractions such as flash based websites and fancy CSS. Oh yeah, you can also say good bye to most ads you see cluttering websites these days when you use links2.