Skip to main content

lynx https://jpfchang.org/

Lynx

// older than CSS, quieter than every browser since.

Lynx, welcome

Why this site bothers to render in a 1992 browser, and what you'll find when it does.

Lynx is older than most of the web. It was written in 1992 at the University of Kansas, predates CSS by two years and JavaScript by three, and it still ships in every major Linux distribution. It does one thing — turn HTML into a navigable text screen — and it does that thing without trusting a single byte of script the network sent you.

This site notices when you visit from Lynx and drops the JavaScript chrome. The terminal at /terminal becomes a directory listing of the virtual filesystem, with every command’s content reachable as a real URL. The games at /games/* become their lore, controls, and source links. The blog renders the way blogs always rendered — paragraphs, headings, anchor links — because Markdown was always a Lynx-friendly shape.

The other files in this directory cover the practical bits. setup collects the lynx.cfg knobs I actually change, keys is a keyboard cheatsheet I keep open the first day I switch to a new machine. Both are short on purpose: Lynx is one of those tools where the manual is too long and the working set is tiny.

lynx.cfg, lightly tuned

A handful of config changes that turn fresh-install Lynx into the browser I actually want.

A stock Lynx works, but a few changes in ~/.lynx/lynx.cfg (or /etc/lynx/lynx.cfg if you prefer system-wide) make the difference between technically renders and pleasant to read.

# Show colour. Pair with `lynx -with_color` or set the env var
# LYNX_CFG_FILE so this runs on every launch.
SHOW_COLOR:ALWAYS

# UTF-8 throughout — nearly every site emits it now.
CHARACTER_SET:utf-8
PREFERRED_CHARSET:utf-8,iso-8859-1;q=0.8,*;q=0.5

# Cookies: ask once per host, remember the answer.
SET_COOKIES:TRUE
ACCEPT_ALL_COOKIES:FALSE
COOKIE_FILE:~/.lynx/cookies
PERSISTENT_COOKIES:TRUE

# Don't follow images you can't see anyway.
MAKE_LINKS_FOR_ALL_IMAGES:FALSE
SUBSTITUTE_UNDERSCORES:TRUE

# Open external programs without prompting for "are you sure".
NO_PROMPT_BETWEEN_FILES:TRUE

A second knob worth knowing: Lynx negotiates content with the server, and a small number of sites still serve a markup-stripped fallback when the User-Agent looks like Lynx. Spoof Firefox if you hit one of those — Lynx will still render the response just fine:

alias lynx='lynx -useragent="Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"'

(But please don’t spoof to read this site — the UA detection is what gives you the tailored banner and the /lynx link in the footer.)

Keys you actually use

Cheatsheet for the dozen Lynx bindings that cover 95% of browsing.

Lynx has dozens of bindings. These twelve cover almost everything I do day-to-day; the rest live one K (keymap reference) keystroke away.

Movement on the page

  • / — move between links
  • Space / b — page down / page up
  • Home / End — top / bottom of the document
  • / — search forward in the page (regex)
  • n — next search match

Following links

  • Enter or — follow the highlighted link
  • — back to previous page
  • g — go to a URL (prompts for input)
  • G — edit the current URL before reloading

Bookmarks and history

  • a — add the current page (or link under cursor) to bookmarks
  • v — view bookmarks
  • Backspace — show history list

The escape hatches

  • K — full keymap reference
  • o — options menu (most lynx.cfg knobs are also reachable here)
  • q — quit (asks); Q — quit without asking
  • Ctrl-R — refresh / reload
  • \ — view source (toggle)

If you only remember three: Space to scroll, +Enter to follow a link, to go back. That is the whole browser.