ELinks Terminal web browser


SUBMITTED BY: xththx

DATE: Oct. 5, 2017, 1:56 p.m.

UPDATED: Oct. 5, 2017, 1:57 p.m.

FORMAT: Text only

SIZE: 4.9 kB

HITS: 738

  1. ELinks
  2. 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.
  3. Installation
  4. Install the elinks package. (sudo apt install elinks -y )
  5. Usage
  6. Start elinks with
  7. $ elinks
  8. or, if you want to start a specific website:
  9. $ elinks bitbin.it
  10. Navigation
  11. Navigating the web with a text browser is more or less the same as a graphical browser, just without the 'distractions'. Once you've 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, k keys to navigate by link.
  12. 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.
  13. Configuration
  14. ELinks provides to two menus, accessable through ELinks, to customize options and keybinds respectivly.
  15. It is recommened to use these tools as opposed to hand-editing the config files (which are placed in ~/.elinks) It is both much easier and safer this way.
  16. By default, access to the option manager is through the o key and access to the keybind-manager is through the k key.
  17. Tips and tricks
  18. Defining URL-handlers
  19. ELinks is capable of using external programs for various tasks,
  20. Defining URL-handlers through the option menu can be a little confusing at first, but once you get it, its fine.
  21. To do this, go into the option manager and navigate to MIME. All the submenus have Info pages to help you.
  22. This is one of the few cases where it might be easier just to edit the conf file.
  23. 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 ~/.elinks/elinks.conf file,
  24. ~/.elinks/elinks.conf
  25. set mime.extension.jpg="image/jpeg"
  26. set mime.extension.jpeg="image/jpeg"
  27. set mime.extension.png="image/png"
  28. set mime.extension.gif="image/gif"
  29. set mime.extension.bmp="image/bmp"
  30. set mime.handler.image_viewer.unix.ask = 1
  31. set mime.handler.image_viewer.unix-xwin.ask = 0
  32. set mime.handler.image_viewer.unix.block = 1
  33. set mime.handler.image_viewer.unix-xwin.block = 0
  34. set mime.handler.image_viewer.unix.program = "ADDYOURTERMINALPICTUREVIEWERHERE %"
  35. set mime.handler.image_viewer.unix-xwin.program = "ADDYOURXPICTUREVIEWERHERE %"
  36. set mime.type.image.jpg = "image_viewer"
  37. set mime.type.image.jpeg = "image_viewer"
  38. set mime.type.image.png = "image_viewer"
  39. set mime.type.image.gif = "image_viewer"
  40. set mime.type.image.bmp = "image_viewer"
  41. Tor usage
  42. ELinks does not support SOCKS directly. Alternatives are to either invoke ELinks through torify elinks, or install the privoxy package for forwarding to Tor's SOCKS proxy, first by adding the following line to your /etc/privoxy/config:
  43. forward-socks5 / localhost:9050 .
  44. Restart privoxy.service, then enter the following lines to your ~/.elinks/elinks.conf:
  45. set protocol.http.proxy.host = "127.0.0.1:8118"
  46. set protocol.https.proxy.host = "127.0.0.1:8118"
  47. Note: The above assumes that Tor is using port 9050 and that privoxy is listening on port 8118
  48. Passing URL's to external commands
  49. You can define commands which ELinks will pass the the current URL to.
  50. To do this, go into the options menu, navigate under Document, then to URI-passing. Then press A to add a new command name. Then navigate to the new command name and press E to edit. Type in the name of command, enter and save.
  51. 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
  52. Note: Elinks allows you to define your own mappings for navigating this menu
  53. Saving link to the X clipboard
  54. echo -n %c | xclip -i
  55. Passing YouTube-links through external player
  56. For strictly YouTube-links, mpv has built-in support. Just use the following,
  57. mpv %c
  58. For a more general approach that can handle many 'tube' sites, you will need youtube-dl. Then add the following command,
  59. youtube-dl -o - %c | mplayer -
  60. Troubleshooting
  61. ELinks froze and I can't start it without it freezing again
  62. 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.
  63. You can prevent ELinks from connecting to an existing instance by starting it like so:
  64. $ elinks -no-connect
  65. If this happens a lot, you might consider making this your default startup by making an alias in your shell:
  66. alias elinks="elinks -no-connect"
  67. Official Website: http://elinks.or.cz/

comments powered by Disqus