ELinks

ELinks is an advanced and well-established feature-rich text mode web (HTTP/FTP/...) browser. ELinks can render both frames and tables, is highly customizable and can be extended via Lua or Guile scripts. It features tabs and some support for CSS.

Installation

Install the elinks package.

Usage

See elinks(1).

Navigating the web with a text browser is more or less the same as a graphical browser, just without the 'distractions'. Once you have started elinks, you can press g and type in the web page you would like to request. Then you can navigate the page using arrow keys to navigate by line, the space bar to navigate by page, or the j and k keys to navigate by link.

Tip: To keep the original terminal session, elinks can be run in a separate w:Virtual console (switch with Alt+arrow) or with a w:Terminal multiplexer such as tmux.

Configuration

ELinks provides to two menus, accessible through ELinks, to customize options and keybinds respectively.

It is recommended to use these tools as opposed to hand-editing the configuration files (which are placed in ~/.elinks). It is both much easier and safer this way.

By default, the o key opens the option manager and the k key the keybind-manager.

Tips and tricks

Defining URL-handlers

ELinks is capable of using external programs for various tasks,

Defining URL-handlers through the option menu can be a little confusing at first, but once you get it, it is fine.

To do this, go into the option manager and navigate to MIME. All the submenus have Info pages to help you.

This is one of the few cases where it might be easier just to edit the configuration file.

For example, to get ELinks to automatically launch your image-viewer when you click on a JPEG file, you can add the following to your file,

~/.elinks/elinks.conf
set mime.extension.jpg="image/jpeg"
set mime.extension.jpeg="image/jpeg"
set mime.extension.png="image/png"
set mime.extension.gif="image/gif"
set mime.extension.bmp="image/bmp"

set mime.handler.image_viewer.unix.ask = 1
set mime.handler.image_viewer.unix-xwin.ask = 0

set mime.handler.image_viewer.unix.block = 1
set mime.handler.image_viewer.unix-xwin.block = 0

set mime.handler.image_viewer.unix.program = "''pictureviewer'' %"
set mime.handler.image_viewer.unix-xwin.program = "''pictureviewer'' %"

set mime.type.image.jpg = "image_viewer"
set mime.type.image.jpeg = "image_viewer"
set mime.type.image.png = "image_viewer"
set mime.type.image.gif = "image_viewer"
set mime.type.image.bmp = "image_viewer"

Tor usage

ELinks does not support SOCKS directly. Alternatives are to either invoke ELinks through , or install the package for forwarding to Tor's SOCKS proxy, first by adding the following line to your :

forward-socks5 / localhost:9050 .

Restart , then enter the following lines to your :

set protocol.http.proxy.host = "127.0.0.1:8118"
set protocol.https.proxy.host = "127.0.0.1:8118"
Note: The above assumes that Tor is using port 9050 and that privoxy is listening on port 8118.

Passing URL's to external commands

You can define commands which ELinks will pass the the current URL to.

To do this, go into the options menu, navigate under Document, then to URI-passing. Then press to add a new command name. Then navigate to the new command name and press to edit. Type in the name of command, enter and save.

Assuming the command "tab-external-command" is mapped to KEY, whenever you press KEY, a menu containing your commands will appear. Select the one you want, and ELinks passes the current URL to that command.

echo -n %c | xclip -i

For strictly YouTube-links, has built-in support. Just use the following:

mpv %c

For a more general approach that can handle many 'tube' sites, you will need . Then add the following command,

youtube-dl -o - %c | mplayer -

Troubleshooting

By default, every time you start ELinks you are connecting to an existing instance. Thus, if that instance freezes, all current and future instances will freeze as well.

You can prevent ELinks from connecting to an existing instance by starting it like so:

$ elinks -no-connect

If this happens a lot, you might consider making this your default startup by making an alias in your shell:

alias elinks="elinks -no-connect"
gollark: If they don't, they'll talk to facts' manager.
gollark: There was a discussion about languages of some kind.
gollark: Orbital bee strikes are not a hugely new concept.
gollark: ... why?
gollark: According to the political compass visualizer, which is completely accurateâ„¢, while you (komrad kit) and C4 are in the same quadrant and very close on the main two axes, you're opposite on the progressive/conservative ones.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.