Difference between revisions of "ELinks"
(New page: '''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 ...) |
|||
Line 65: | Line 65: | ||
For the other (mostly minor) planned features [http://bugzilla.elinks.cz/buglist.cgi?bug_severity=enhancement&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED check the enhancement bugs] filed against [http://bugzilla.elinks.cz/ Bugzilla]. | For the other (mostly minor) planned features [http://bugzilla.elinks.cz/buglist.cgi?bug_severity=enhancement&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED check the enhancement bugs] filed against [http://bugzilla.elinks.cz/ Bugzilla]. | ||
+ | |||
+ | ==Options== | ||
+ | |||
+ | Most options can be set in the user interface or config file, so usually you do not need to care about them. Note that this list is roughly equivalent to the output of running ELinks with the option --long-help. | ||
+ | |||
+ | ;<code>-anonymous [0|1] (default: 0)</code> | ||
+ | :Restricts ELinks so it can run on an anonymous account. Local file browsing, downloads, and modification of options will be disabled. Execution of viewers is allowed, but entries in the association table can't be added or modified. | ||
+ | |||
+ | ;<code>-auto-submit [0|1] (default: 0)</code> | ||
+ | :Automatically submit the first form in the given URLs. | ||
+ | |||
+ | ;<code>-base-session <num> (default: 0)</code> | ||
+ | :Used internally when opening ELinks instances in new windows. The ID maps to information that will be used when creating the new instance. You don't want to use it. | ||
+ | |||
+ | ;<code>-config-dir <str> (default: "")</code> | ||
+ | :Path of the directory ELinks will read and write its config and runtime state files to instead of ~/.elinks. If the path does not begin with a '/' it is assumed to be relative to your HOME directory. | ||
+ | |||
+ | ;<code>-config-dump</code> | ||
+ | :Print a configuration file with options set to the built-in defaults to stdout. | ||
+ | |||
+ | ;<code>-config-file <str> (default: "elinks.conf")</code> | ||
+ | :Name of the configuration file that all configuration options will be read from and written to. It should be relative to config-dir. | ||
+ | |||
+ | ;<code>-config-help</code> | ||
+ | :Print help for configuration options and exit. | ||
+ | |||
+ | ;<code>-default-mime-type (alias for mime.default_type)</code> | ||
+ | :The default MIME type used for documents of unknown type. | ||
+ | |||
+ | ;<code>-default-keys [0|1] (default: 0)</code> | ||
+ | :When set, all keybindings from configuration files will be ignored. It forces use of default keybindings and will reset user-defined ones on save. | ||
+ | |||
+ | ;<code>-dump [0|1] (default: 0)</code> | ||
+ | :Print formatted plain-text versions of given URLs to stdout. | ||
+ | |||
+ | ;<code>-dump-charset (alias for document.dump.codepage)</code> | ||
+ | :Codepage used when formatting dump output. | ||
+ | |||
+ | ;<code>-dump-color-mode (alias for document.dump.color_mode)</code> | ||
+ | :Color mode used with -dump. | ||
+ | |||
+ | ;<code>-dump-width (alias for document.dump.width)</code> | ||
+ | :Width of the dump output. | ||
+ | |||
+ | ;<code>-eval</code> | ||
+ | :Specify configuration file directives on the command-line which will be evaluated after all configuration files has been read. Example usage: -eval 'set protocol.file.allow_special_files = 1' | ||
+ | |||
+ | ;<code>-force-html</code> | ||
+ | :Makes ELinks assume documents of unknown types are HTML. Useful when using ELinks as an external viewer from MUAs. This is equivalent to -default-mime-type text/html. | ||
+ | |||
+ | ;<code>-?, -h, -help</code> | ||
+ | :Print usage help and exit. | ||
+ | |||
+ | ;<code>-localhost [0|1] (default: 0)</code> | ||
+ | :Restricts ELinks to work offline and only connect to servers with local addresses (ie. 127.0.0.1). No connections to remote servers will be permitted. | ||
+ | |||
+ | ;<code>-long-help</code> | ||
+ | :Print detailed usage help and exit. | ||
+ | |||
+ | ;<code>-lookup</code> | ||
+ | :Look up specified host and print all DNS resolved IP addresses. | ||
+ | |||
+ | ;<code>-no-connect [0|1] (default: 0)</code> | ||
+ | :Run ELinks as a separate instance instead of connecting to an existing instance. Note that normally no runtime state files (bookmarks, history, etc.) are written to the disk when this option is used. See also -touch-files. | ||
+ | |||
+ | ;<code>-no-home [0|1] (default: 0)</code> | ||
+ | :Disables creation and use of files in the user specific home configuration directory (~/.elinks). It forces default configuration values to be used and disables saving of runtime state files. | ||
+ | |||
+ | ;<code>-no-numbering (alias for document.dump.numbering)</code> | ||
+ | :Prevents printing of link number in dump output. | ||
+ | :Note that this really affects only -dump, nothing else. | ||
+ | |||
+ | ;<code>-no-references (alias for document.dump.references)</code> | ||
+ | :Prevents printing of references (URIs) of document links in dump output. | ||
+ | :Note that this really affects only -dump, nothing else. | ||
+ | |||
+ | ;<code>-remote</code> | ||
+ | :Control a remote ELinks instance by passing commands to it. The option takes an additional argument containing the method which should be invoked and any parameters that should be passed to it. For ease of use, the additional method argument can be omitted in which case any URL arguments will be opened in new tabs in the remote instance. | ||
+ | :Following is a list of the supported methods: | ||
+ | :* ping(): look for a remote instance | ||
+ | :* openURL(): prompt URL in current tab | ||
+ | :* openURL(URL): open URL in current tab | ||
+ | :* openURL(URL, new-tab): open URL in new tab | ||
+ | :* openURL(URL, new-window): open URL in new window | ||
+ | :* addBookmark(URL): bookmark URL | ||
+ | :* infoBox(text): show text in a message box | ||
+ | :* xfeDoCommand(openBrowser): open new window | ||
+ | |||
+ | ;<code>-session-ring <num> (default: 0)</code> | ||
+ | :ID of session ring this ELinks session should connect to. ELinks works in so-called session rings, whereby all instances of ELinks are interconnected and share state (cache, bookmarks, cookies, and so on). By default, all ELinks instances connect to session ring 0. You can change that behaviour with this switch and form as many session rings as you want. Obviously, if the session-ring with this number doesn't exist yet, it's created and this ELinks instance will become the master instance (that usually doesn't matter for you as a user much). | ||
+ | :Note that you usually don't want to use this unless you're a developer and you want to do some testing - if you want the ELinks instances each running standalone, rather use the -no-connect command-line option. Also note that normally no runtime state files are written to the disk when this option is used. See also -touch-files. | ||
+ | |||
+ | ;<code>-source [0|1] (default: 0)</code> | ||
+ | :Print given URLs in source form to stdout. | ||
+ | |||
+ | ;<code>-touch-files [0|1] (default: 0)</code> | ||
+ | :When enabled, runtime state files (bookmarks, history, etc.) are written to disk, even when -no-connect or -session-ring is used. The option has no effect if not used in conjunction with any of these options. | ||
+ | |||
+ | ;<code>-verbose <num> (default: 1)</code> | ||
+ | :The verbose level controls what messages are shown at start up and while running: | ||
+ | :* 0 means only show serious errors | ||
+ | :* 1 means show serious errors and warnings | ||
+ | :* 2 means show all messages | ||
+ | |||
+ | ;<code>-version</code> | ||
+ | :Print ELinks version information and exit. | ||
+ | |||
+ | ''Note: Generated using output from ELinks version 0.12pre5.'' | ||
+ | |||
+ | ===Environment variables=== | ||
+ | |||
+ | ;<code>COMSPEC, SHELL</code> : The shell used for File -> OS Shell on DOS/Windows and UNIX, respectively. | ||
+ | ;<code>EDITOR</code> : The program to use for external editor (when editing textareas). | ||
+ | ;<code>ELINKS_CONFDIR</code> : The location of the directory containing configuration files. If not set the default is ~/.elinks/. | ||
+ | ;<code>ELINKS_TWTERM, LINKS_TWTERM</code> : The command to run when selecting File -> New window and if TWDISPLAY is defined (default twterm -e). | ||
+ | ;<code>ELINKS_XTERM, LINKS_XTERM</code> : The command to run when selecting File -> New window and if DISPLAY is defined (default xterm -e). | ||
+ | ;<code>FTP_PROXY, HTTP_PROXY, HTTPS_PROXY</code> : The host to proxy the various protocol traffic through. | ||
+ | ;<code>NO_PROXY</code> : A comma separated list of URLs which should not be proxied. | ||
+ | ;<code>HOME</code> : The path to the users home directory. Used when expanding ~/. | ||
+ | ;<code>WWW_HOME</code> : Homepage location (as in lynx(1)). | ||
+ | |||
+ | ===Files=== | ||
+ | |||
+ | Configuration files controlled by ELinks are located in the user configuration directory, defaulting to ~/.elinks/. In addition to the files listed below, a user defined CSS stylesheet can be defined using the document.css.stylesheet option. | ||
+ | |||
+ | ;<code>/etc/elinks.conf</code> : Site-wide configuration file. | ||
+ | ;<code>~/.elinks/elinks.conf</code> : Per-user config file, loaded after site-wide configuration. | ||
+ | ;<code>~/.elinks/bookmarks</code> : Bookmarks file. | ||
+ | ;<code>~/.elinks/cookies</code> : Cookies file. | ||
+ | ;<code>~/.elinks/exmodehist</code> : Exmode history file. | ||
+ | ;<code>~/.elinks/formhist</code> : Form history file. | ||
+ | ;<code>~/.elinks/globhist</code> : History file containing most recently visited URLs. | ||
+ | ;<code>~/.elinks/gotohist</code> : GoTo URL dialog history file. | ||
+ | ;<code>~/.elinks/hooks.{js,lua,pl,py,rb,scm}</code> : Browser scripting hooks. | ||
+ | ;<code>~/.elinks/searchhist</code> : Search history file. | ||
+ | ;<code>~/.elinks/socket</code> : Internal ELinks socket for communication between its instances. | ||
+ | ;<code>~/.mailcap, /etc/mailcap</code> : Mappings of MIME types to external handlers. | ||
+ | ;<code>~/.mime.types, /etc/mime.types</code> : Mappings of file extensions to MIME types. | ||
==Examples== | ==Examples== |
Latest revision as of 20:05, 24 July 2012
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 is quite portable and runs on a variety of platforms. Check the about page for a more complete description.
Contents
Features
- [c]
- means the feature is configurable at build time.
- [d]
- means the feature depends on help from an external library or program. Some of the dependencies are listed on the installation page.
- [e]
- means the feature is experimental and might not be complete or released.
Protocols and standards
- HTML3 (but will eat most HTML tag soup and also a lot of HTML4 stuff)
- Local file support
- HTTP authentication
- Proxy authentication
- JavaScript / ECMAScript [e] [c] [d]
- SSL (https) using either OpenSSL or GNU TLS [c] [d]
- Cascading Style Sheets [e] [c]
- FTP support (passive and active mode)
- Finger support [c]
- IPv6 support [c]
- Local CGI support [c]
- SMB support (requires smbclient) [c] [d]
- Persistent cookies support [c]
- Mimetypes file support for mapping file extensions to content types [c]
- Mailcap support for mapping content types to external handlers [c]
- Internationalized domain names [c] [d]
User interface
- Cute menus and dialogs
- Tabbed browsing
- Translated to many languages [c]
- Full-featured history browsing [c]
- Keybinding manager to easily change bindings or add new ones
- Forms history [c]
- Completion and history in commonly used input dialogs
- Typeahead searches
- Command line mode [e]
Configuration and extensions
- Highly configurable through menus and/or human readable text files
- Support for browser scripting (Lua, Guile, Perl) [c] [d]
- Hiearchic bookmarks
- XBEL bookmarks format support [c] [d]
Rendering
- Tables and frames rendering
- Support for monochrome, 16 (ANSI) colors and 256 colors ([c]) terminals
- Full color support - both foreground and background according to user configuration and/or as specified in the document
Downloading
- Background (non-blocking) downloads
- Download resuming support
- Compressed downloads support [c] [d]
Future goals
The current main goals of ELinks are:
- HTML engine rewrite; DOM support
- Graphics mode support
- Disk cache (maybe :)
For the other (mostly minor) planned features check the enhancement bugs filed against Bugzilla.
Options
Most options can be set in the user interface or config file, so usually you do not need to care about them. Note that this list is roughly equivalent to the output of running ELinks with the option --long-help.
-anonymous [0|1] (default: 0)
- Restricts ELinks so it can run on an anonymous account. Local file browsing, downloads, and modification of options will be disabled. Execution of viewers is allowed, but entries in the association table can't be added or modified.
-auto-submit [0|1] (default: 0)
- Automatically submit the first form in the given URLs.
-base-session <num> (default: 0)
- Used internally when opening ELinks instances in new windows. The ID maps to information that will be used when creating the new instance. You don't want to use it.
-config-dir <str> (default: "")
- Path of the directory ELinks will read and write its config and runtime state files to instead of ~/.elinks. If the path does not begin with a '/' it is assumed to be relative to your HOME directory.
-config-dump
- Print a configuration file with options set to the built-in defaults to stdout.
-config-file <str> (default: "elinks.conf")
- Name of the configuration file that all configuration options will be read from and written to. It should be relative to config-dir.
-config-help
- Print help for configuration options and exit.
-default-mime-type (alias for mime.default_type)
- The default MIME type used for documents of unknown type.
-default-keys [0|1] (default: 0)
- When set, all keybindings from configuration files will be ignored. It forces use of default keybindings and will reset user-defined ones on save.
-dump [0|1] (default: 0)
- Print formatted plain-text versions of given URLs to stdout.
-dump-charset (alias for document.dump.codepage)
- Codepage used when formatting dump output.
-dump-color-mode (alias for document.dump.color_mode)
- Color mode used with -dump.
-dump-width (alias for document.dump.width)
- Width of the dump output.
-eval
- Specify configuration file directives on the command-line which will be evaluated after all configuration files has been read. Example usage: -eval 'set protocol.file.allow_special_files = 1'
-force-html
- Makes ELinks assume documents of unknown types are HTML. Useful when using ELinks as an external viewer from MUAs. This is equivalent to -default-mime-type text/html.
-?, -h, -help
- Print usage help and exit.
-localhost [0|1] (default: 0)
- Restricts ELinks to work offline and only connect to servers with local addresses (ie. 127.0.0.1). No connections to remote servers will be permitted.
-long-help
- Print detailed usage help and exit.
-lookup
- Look up specified host and print all DNS resolved IP addresses.
-no-connect [0|1] (default: 0)
- Run ELinks as a separate instance instead of connecting to an existing instance. Note that normally no runtime state files (bookmarks, history, etc.) are written to the disk when this option is used. See also -touch-files.
-no-home [0|1] (default: 0)
- Disables creation and use of files in the user specific home configuration directory (~/.elinks). It forces default configuration values to be used and disables saving of runtime state files.
-no-numbering (alias for document.dump.numbering)
- Prevents printing of link number in dump output.
- Note that this really affects only -dump, nothing else.
-no-references (alias for document.dump.references)
- Prevents printing of references (URIs) of document links in dump output.
- Note that this really affects only -dump, nothing else.
-remote
- Control a remote ELinks instance by passing commands to it. The option takes an additional argument containing the method which should be invoked and any parameters that should be passed to it. For ease of use, the additional method argument can be omitted in which case any URL arguments will be opened in new tabs in the remote instance.
- Following is a list of the supported methods:
- ping(): look for a remote instance
- openURL(): prompt URL in current tab
- openURL(URL): open URL in current tab
- openURL(URL, new-tab): open URL in new tab
- openURL(URL, new-window): open URL in new window
- addBookmark(URL): bookmark URL
- infoBox(text): show text in a message box
- xfeDoCommand(openBrowser): open new window
-session-ring <num> (default: 0)
- ID of session ring this ELinks session should connect to. ELinks works in so-called session rings, whereby all instances of ELinks are interconnected and share state (cache, bookmarks, cookies, and so on). By default, all ELinks instances connect to session ring 0. You can change that behaviour with this switch and form as many session rings as you want. Obviously, if the session-ring with this number doesn't exist yet, it's created and this ELinks instance will become the master instance (that usually doesn't matter for you as a user much).
- Note that you usually don't want to use this unless you're a developer and you want to do some testing - if you want the ELinks instances each running standalone, rather use the -no-connect command-line option. Also note that normally no runtime state files are written to the disk when this option is used. See also -touch-files.
-source [0|1] (default: 0)
- Print given URLs in source form to stdout.
-touch-files [0|1] (default: 0)
- When enabled, runtime state files (bookmarks, history, etc.) are written to disk, even when -no-connect or -session-ring is used. The option has no effect if not used in conjunction with any of these options.
-verbose <num> (default: 1)
- The verbose level controls what messages are shown at start up and while running:
- 0 means only show serious errors
- 1 means show serious errors and warnings
- 2 means show all messages
-version
- Print ELinks version information and exit.
Note: Generated using output from ELinks version 0.12pre5.
Environment variables
COMSPEC, SHELL
- The shell used for File -> OS Shell on DOS/Windows and UNIX, respectively.
EDITOR
- The program to use for external editor (when editing textareas).
ELINKS_CONFDIR
- The location of the directory containing configuration files. If not set the default is ~/.elinks/.
ELINKS_TWTERM, LINKS_TWTERM
- The command to run when selecting File -> New window and if TWDISPLAY is defined (default twterm -e).
ELINKS_XTERM, LINKS_XTERM
- The command to run when selecting File -> New window and if DISPLAY is defined (default xterm -e).
FTP_PROXY, HTTP_PROXY, HTTPS_PROXY
- The host to proxy the various protocol traffic through.
NO_PROXY
- A comma separated list of URLs which should not be proxied.
HOME
- The path to the users home directory. Used when expanding ~/.
WWW_HOME
- Homepage location (as in lynx(1)).
Files
Configuration files controlled by ELinks are located in the user configuration directory, defaulting to ~/.elinks/. In addition to the files listed below, a user defined CSS stylesheet can be defined using the document.css.stylesheet option.
/etc/elinks.conf
- Site-wide configuration file.
~/.elinks/elinks.conf
- Per-user config file, loaded after site-wide configuration.
~/.elinks/bookmarks
- Bookmarks file.
~/.elinks/cookies
- Cookies file.
~/.elinks/exmodehist
- Exmode history file.
~/.elinks/formhist
- Form history file.
~/.elinks/globhist
- History file containing most recently visited URLs.
~/.elinks/gotohist
- GoTo URL dialog history file.
~/.elinks/hooks.{js,lua,pl,py,rb,scm}
- Browser scripting hooks.
~/.elinks/searchhist
- Search history file.
~/.elinks/socket
- Internal ELinks socket for communication between its instances.
~/.mailcap, /etc/mailcap
- Mappings of MIME types to external handlers.
~/.mime.types, /etc/mime.types
- Mappings of file extensions to MIME types.
Examples
- Percent of USA population murdered by year (source: FBI):
elinks -dump http://bit.ly/qutWZK%7Csed -n -e 's/,//g' -e '/^1960/,/^2010/p'|awk '{p=$6/$2*100; print $1 " " p}'