XEphem sky viewer, reborn in the browser
Public quest. Recreate the Sky View of XEphem — the Motif/X11 ephemeris that has looked like 1993 since 1993 — as a browser app. The astronomy is a solved problem; the UI is the project. Rohan has never run the app, only seen screenshots, and loves exactly that: the 90s Unix aesthetic, on purpose.
The program being honored
| what | "X Window System + Ephemeris" — serious interactive ephemeris + planetarium |
| author | Elwood C. Downey (Clear Sky Institute) |
| lineage | the Unix/Motif port of ephem, his character-based 24×80 ephemeris for DOS from the early 1980s |
| first public release | XEphem 2.5, December 1993 |
| toolkit | C, X11 + Motif — the look is not a theme, it is the toolkit |
| license | proprietary "personal use" for decades → MIT since 7 Feb 2021, version jumped 3.7.7 → 4.0.0 |
| today | community-maintained at github.com/XEphem/XEphem; Downey died January 2026 (his last contribution, the WMM2025 file, shipped in the 4.3.0 release notes); 4.3.0 (2026-03-06) restored arrow-key panning and PgUp/PgDn zoom |
| long shadow | PyEphem (now ephem, Brandon Rhodes) reuses XEphem's numerical routines, with Downey's permission |
The Sky View is the window that matters: an interactive star chart — zoom, pan, coordinate grids, constellation figures, catalog overlays, marks, DSS image downloads. (Mouse-wheel zoom only arrived in 4.2.0, Feb 2024 — the interface stayed period-correct for three decades, which is the whole charm.)
What to build (cheapest first)
- The chrome — the actual quest. Motif bevels and separators, a chunky button row,
fixed-width labels, a menu bar that reads
File Edit View Data, a status strip for RA/Dec / alt-az / time, colors from an 8-bit palette. A modern canvas wearing the 1993 window manager. - Stars. The HYG catalog (Hipparcos + Yale Bright Star + Gliese, ~120k stars) — pre-filter at build time to naked-eye and ship compact. J2000 positions precessed to the date of view, then projected.
- Time and place. An observer (lat/lon), and a clock you can scrub — that is the ephemeris part: the sky tomorrow night, the sky on the night of 1993-12-01.
- Sun, Moon, planets.
astronomy-engine(MIT, pure JS): VSOP87/ELP2000, sub-arcsecond for the ten traditional planets over ~1700–2200 CE, withHorizon()for alt/az and rise/set/phase searches. - The XEphem extras, in order of payoff: coordinate-grid toggles · constellation figures · object list + info panel (the "you clicked a star, here's the catalogue entry" moment) · DSS imagery pull · and then stop — telescope control (XEphem drives Meade/Celestron hardware over INDI) is out of scope for the browser.
Stack notes (all free for this use)
| need | pick | why |
|---|---|---|
| planet / Sun / Moon positions, coordinate transforms, events | astronomy-engine (MIT) | pure JS, ~250 KB, one Observer + Horizon() call, no build step needed |
| star positions | HYG database | the canonical merged catalog; pre-process CSV → typed arrays; carry the upstream notice |
| 3D star sphere | three.js | already in the house for the apartment 3d |
| 2D chart / projections | d3 / canvas | d3-celestial is the reference implementation of an HYG+D3 sky |
| arcsecond-grade precision (not needed for a viewer) | Swiss Ephemeris WASM | AGPL — network clause applies. Skip. |
Running the original locally (done 2026-09-28)
xephem/ in this repo runs the real thing in a container — same Motif widgets, same fonts,
no admin password, viewable in a browser over noVNC:
cd xephem && docker build -t xephem-viewer . && ./fetch-data.sh
docker run --rm -p 6080:6080 -v "$PWD/share:/opt/xephem-share" --name xephem xephem-viewer
# → http://localhost:6080/vnc.html?autoconnect=1&resize=scale
It opens with the Sky View already up, the site set to Chicago, and 43 auxil files +
catalogs staged. See xephem/README.md for the whole story.
The native macOS window (the nicer experience, one admin step): brew install openmotif openssl is done; run brew install --cask xquartz once (asks for your password), then
xephem/run-native.sh fetches, builds and launches it as a real XQuartz window. Verified
2026-09-29 on this machine (Intel, macOS 26.6.2): 4.3.0 compiles clean against brew's Motif and
links libXm/libXt/libXmu/libX11. groff turned out to be unnecessary — upstream
lists it, but it only serves man pages and drags in ghostscript + tesseract + pango.
Three traps, paid for once so nobody pays again:
- The Sky View aborts (SIGABRT) without
auxil/. No message beyondauxil/logo.gif: No such file or directory; Sun/Moon/Earth views are unaffected, so it looks like a Sky-View bug. The GitHub tarball'sauxil/is partial — the rest (moon.fts, marsmap.fts, xephem_sites, xephem_skyhist, …) survives on an ESO mirror. XEphem.SkyViewUp: 1aborts at startup — the app's own saved-window-state resource kills the process before it draws. The Sky View has to be opened from the View menu.make -jfails — upstream builds its bundled libs in the same pass as the final link, so a parallel make races intold: cannot find -lastro.
And the site is configured by X resources, not a config file: XEphem.Sitename
(default "Chicago, Illinois" with obviously wrong 0:0:0 coordinates), XEphem.Lat /
XEphem.Long (+ north / + WEST, d:m:s), XEphem.TZone (hours behind UTC), and
XEphem.ShareDir (where auxil/ and catalogs/ live).
The palette, from the program's own resources
Free gift for the rebuild — GUI/xephem/fallbacks.c gives the exact colors, so the
browser version can be faithful instead of "90s-ish":
| element | value | element | value | |
|---|---|---|---|---|
| sky background | #151515 | constellation lines | #7fc149 | |
| constellation names | #a5ad7a | constellation boundaries | #435964 | |
| coordinate grid | #0068b9 | celestial equator | #ff0000 | |
| annotations | #bfc1c6 | Milky Way | #c65400 | |
| FOV / eye piece | #aa1010 | grid font | *-helvetica*bold*-r-*10-* |
Planet tones too (moonColor #d9d9d9, marsColor #ffb568, saturnColor #efcb9e, …), and the
sky's default trail state is SkyViewTrailState: 4 3 2 1 0 0 10 0 0.0.
Open questions (Rohan's call)
- Scope: just the Sky View, or the other XEphem windows too (Earth / Moon / Sun / planet views)?
- Local sky vs atlas: the sky above Chicago right now, or a free-floating chart you can pan to any date and place? (XEphem is both; the scrubber makes it cinematic.)
- How retro: Motif chrome around a crisp modern canvas (my instinct — readable and evocative), or full pretend-1993 with bitmap fonts and dithered 8-bit color?
- Where it lives: a public route, likely
/sky, like/streetsand/muscle-up. Confirm the route name. - Naming: MIT means the name is usable with attribution, but this is its own thing — "xephem" as homage vs its own name is your call.
- Catalog depth: naked-eye (~9k stars, tiny payload) vs full HYG (~120k, still fine as binary).
- Is this a "learn the sky" tool or an art piece? It changes the answer to nearly every layout question above.
Status
Germ, plus a running original. Nothing of the rebuild exists yet — but the real XEphem
4.3.0 is now running locally in xephem/ (container, browser-viewable), so the UI can be
studied directly instead of from screenshots. Page written 2026-09-28 from research and a
live session with the program.
Sources
- XEphem — Wikipedia (lineage, 1993 first release, Motif, license history)
- XEphem/XEphem on GitHub (MIT since 4.0.0; releases 4.2.0 / 4.3.0; 2025 maintainership)
- Astronomy Engine (JavaScript) — MIT; VSOP87/ELP2000; accuracy window ~1700–2200 CE
- astronexus/HYG-Database — Hipparcos + Yale BSC + Gliese merged catalog
- d3-celestial — reference browser planetarium built on HYG-derived data
- three-starmap — three.js point-mesh star map (~8,900 naked-eye stars, 88 constellations)