Use Lynx Browser with Image Support in X11 for Fast Low Bandwidth Web Browsing
To get Lynx running in X11 with support for images, you’ll need Xcode (or at least gcc) and Xquartz to be installed, plus the links source to compile:
- Get Xcode from the App Store, or install GCC without the entire Xcode package by getting command line tools from the Apple Dev Center
- Get X11 with Xquartz and install it in OS X to be able to run X11 on the Mac if you haven’t done so yet
- Download the Links tar ball (direct link, currently version 2.7)
Though it’d be best to have some experience with compiling and using the command line, if you don’t we’ll walk through each necessary command to get this working:
Change to the directory which you downloaded links (let’s assume ~/Desktop/)
Uncompress links with tar
tar -xvf links-2.7.tar.gz
Change to the newly created directory:
Configure links to support common image formats, rendering, x11, graphics, and openssl:
./configure --x-includes=/usr/include/X11/ --x-libraries=/usr/X11/lib/ --enable-graphics --with-ssl=openssl
You’ll see a ton of config checks scroll by, and at the bottom you should see something like the following:
Supported compression: ZLIB BZIP2
SSL support: OPENSSL
UTF-8 terminal: YES
GPM support: NO
Graphics enabled: YES
Graphics drivers: X
Image formats: GIF PNG XBM JPEG TIFF
The key thing to look for is the “Graphics Enabled” and support of image formats, this is what allows you to still view images on the web.
Now you just need to compile and install links:
sudo make install
Once installed you can now use links either in text-only mode, or better yet, with graphics support by running it within X11. Note that if you installed X11 in this process, you may need to log in and out first before X11 will function properly.
Launch links with graphic support in x11 by using the -g flag:
links -g http://osxdaily.com
You’ll now have lynx running in x11 with image support:
Obviously no web pages look particularly great in this format, but that’s not the point, the point is a low bandwidth experience that is very fast to use, not a fancy web browser:
Pictures only show so much, the brief video below shows what it’s like to browse the web with X11 Lynx built with graphic support:
Lynx does not use the mouse cursor to navigate, everything is handled by the keyboard.
Basic Lynx Navigation Shortcuts
Using lynx in X11 with image support is basically the same as the command line. Here are a few essential lynx keyboard shortcuts to get around.
- Up & Down arrows to navigate page content and on page links
- Left arrow to move back a page
- Right arrow to follow highlighted link (same as Enter)
- Page Up & Page Down to navigate full webpage screen at a time
- Return key to follow links
- G to go to a new URL
- Control-R to refresh
- / to search
Finally, let’s make a few shortcuts to speed up launching X11 Lynx:
Create a X11 Applications Menu Shortcut for GUI Lynx
- Pull down the X11 “Applications” menu and choose “Customize”
- Click “Add Item” and under “Command” fill in “links -g” and under “Name” put something like ‘LynxGUI’
- Close the Customize window and find the short link under the X11 Application menu
Create a Command Line Alias for GUI Lynx
- Open .bash_profile and place something like the following as an alias:
- Now you can type “linksgui” at the command line to quickly launch links in X11 too
alias linksgui='links -g http://osxdaily.com &'
Enjoy your new super-fast low bandwidth web experience.
This article is obviously geared towards Mac users and OS X, but lynx can also be compiled with x11 support within linux too. Ditch the Xcode and Xquartz portion of the walkthrough and the config is otherwise identical.
Alternatively: Use MacPorts to Install Links with X11 & Image Support
For those who have MacPorts installed, the installation process is even easier and can be done in just four simple commands:
$ sudo port -v install xorg-server
$ sudo port -v install links +x11
$ /opt/local/bin/startx &
$ links -g
Thanks to Eric for the original submission and great tip idea, and thanks to Tyson W for the macports trick by way of Facebook!