Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

190.1. w3m-0.5.6

Text-mode web browser and pager that renders tables

0.5.6-1 · w3m · 0.5 SBU · 1.9 MiB, 22 files · 42_graphics, 67 of 189 · ports/core/browsers/w3m

Homepage: https://sr.ht/~rkta/w3m/

Why it is in KDOS. The comment above it in script/phases/42_graphics/packages.d/browsers.txt:

It renders TABLES, which is why it is here and not lynx: technical HTML is full of them and lynx flattens them into unreadable runs of text.

w3m is a text-mode web browser and pager. It runs in a terminal or on a bare console, lays HTML tables out on the character grid, and opens a link in a graphical browser through xdg-open when asked to. KDOS also uses it as a renderer: w3m -dump turns an HTML mail into readable text (see Rendering attachments).

Depends on: autoconf, automake, pkgconf, ncurses, openssl, zlib, bdwgc, perl, gdk-pixbuf, libsixel, xdg-utils.

Required by (1): aerc.

Sources: w3m-0.5.6.tar.gz (2.2 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install w3m'

build.sh:

./configure \
	--prefix=/usr \
	--libexecdir=/usr/lib \
	--sysconfdir=/etc \
	--enable-image=fb \
	--with-imagelib=gtk2 \
	--disable-xface \
	--with-browser=xdg-open \
	--disable-w3mmailer \
	--disable-nls \
	--with-termlib=ncurses \
	--with-ssl

make
make DESTDIR=$PKG install

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/w3m.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=Web Browser (w3m)
GenericName=Web Browser
Comment=Browse the web on the grid
Exec=w3m -v %u
Icon=internet-web-browser
Terminal=true
Categories=Network;WebBrowser;
Keywords=web;browser;http;html;w3m;
EOF
chmod 644 "$PKG/usr/share/applications/w3m.desktop"

Programs: w3m, w3mman.

Directories: /usr/lib/w3m, /usr/share/licenses/w3m, /usr/share/w3m.

The desktop entry is KDOS’s own. Its Exec= passes -v, w3m’s visual start: started from Start with no address, w3m opens its welcome page instead of printing its usage and exiting, which would close the terminal before anything is seen. An address given to the entry is opened as usual.