← Commit history
README.md+13−6
@@ -18,8 +18,15 @@ host half on your computer during setup and after every update. ## Two halves  **In the workspace** (`install.sh`, then `hooks/hydrogen-linux-platform-hygiene.sh` after every-package update): ffmpeg with libx264 (AI runs that make video), the en_US.UTF-8 locale, and-earlyoom, as in the Windows workspace.+package update):+- ffmpeg with libx264 (AI runs that make video);+- the en_US.UTF-8 locale;+- Node 22 LTS when the workspace's Node is older than 20 (the official nodejs.org build, checked+  against its SHA256SUMS);+- earlyoom, told never to stop VS Code (its extension host runs every AI chat), Hydrogen or the+  AI CLIs, and to stop compilers, linkers and ffmpeg first;+- the AIs' sign-in sites trusted in VS Code, so their sign-in pages open without "Do you want to+  open the external website?".  **On the computer** (`host/hydrogen-host-setup.sh`): Hydrogen runs it with **one password prompt**. It installs only what is missing, says what it is about to change, and changes nothing@@ -38,7 +45,7 @@ on a second run. `check` changes nothing at all; Hydrogen Doctor uses it. | Dictate audio | Hydrogen records the mic itself | PipeWire's `pw-record` (or `pulseaudio-utils` on PulseAudio) | `pipewire-utils` | | Clipboard tools | an annotate picture stays on the clipboard | `wl-clipboard`, `xclip` | same | | Notifications, links | Adom Bridge notifications, opening links | `libnotify-bin`, `xdg-utils` | `libnotify`, `xdg-utils` |-| Out-of-memory guard | a full memory must not freeze the desktop | `earlyoom` where systemd-oomd is not running (Debian) | systemd-oomd |+| Out-of-memory guard | a full memory must not freeze the desktop, and never stops VS Code, Hydrogen or the AIs | `earlyoom` where systemd-oomd is not running (Debian), with Hydrogen's avoid and prefer lists | systemd-oomd | | Adom fonts | dashboards and tiles | Familjen Grotesk, Satoshi, JetBrains Mono in `~/.local/share/fonts` | same | | Workspace time zone | the workspace follows the computer | set on every run | same | | Google Chrome (optional) | only the native browser bridge needs it; your default browser is kept | Google's .deb | Google's .rpm |@@ -47,9 +54,9 @@ In the workspace it also installs the libraries headless Chrome needs (`libnss3` `libasound2t64`, `libgbm1` and the rest), so tools that drive Chrome there (Hero Studio, page renders) work. -**Known gaps, next:** the workspace's Node is 18 and some tools (`@puppeteer/browsers`) need 20 or-later; tools in the workspace cannot reach the computer's Adom Bridge relay the way `adom-bridge-ping` does (Hero Studio's pup fallback answers "Adom Desktop did not answer browser_status").+**Known gap, next:** tools in the workspace cannot reach the computer's Adom Bridge relay the way+`adom-bridge ping` does (Hero Studio's pup fallback answers "Adom Desktop did not answer+browser_status").  It also checks, and reports in Doctor: the Adom Bridge window list extension on GNOME Wayland (Adom Bridge installs it; it is active after logging out and in once), Adom Bridge's mesh
hooks/hydrogen-linux-platform-hygiene.sh+48
@@ -27,4 +27,52 @@ fi if ! systemctl is-active -q earlyoom 2>/dev/null; then   { command -v earlyoom >/dev/null 2>&1 || apt_i earlyoom; } && sudo -n systemctl enable --now earlyoom >/dev/null 2>&1 && log+=("earlyoom on") || log+=("earlyoom not started") fi+# 3b. WHAT earlyoom MAY STOP (DIR-151403-30275, Debian 13 on 6 GB: it stopped code-server's+#     extension host three times, which runs every AI chat; the host is named MainThread and has+#     the highest OOM score in the workspace). Never: code-server (MainThread), Hydrogen, the+#     desktop, the AI CLIs. First: compilers, linkers, cargo, ffmpeg. Written once; a changed line+#     restarts earlyoom.+EOOM_ARGS='-r 3600 -m 4 -s 10 --avoid (^|/)(init|systemd|sshd|MainThread|code-server|adom-hydrogen|hydrogen|gnome-shell|Xwayland|Xorg|cinnamon|plasmashell|kwin_wayland|claude|codex|kimi|agy|adom-bridge)$ --prefer (^|/)(cc1|cc1plus|cc1obj|rustc|ld|ld[.]lld|ld[.]gold|lld|mold|clang|clang[+][+]|gcc|g[+][+]|cargo|make|ninja|ffmpeg|esbuild|tsc|webpack|kicad-cli)$'+if [ -f /etc/default/earlyoom ] && ! grep -qF -- "$EOOM_ARGS" /etc/default/earlyoom; then+  printf '# Adom Hydrogen (adom/hydrogen-linux-bootstrap): what earlyoom may stop, and what first.\nEARLYOOM_ARGS="%s"\n' "$(printf '%s' "$EOOM_ARGS")" | sudo -n tee /etc/default/earlyoom >/dev/null \+    && sudo -n systemctl restart earlyoom >/dev/null 2>&1 && log+=("earlyoom spares VS Code and the AIs") || log+=("earlyoom config FAILED")+fi+# 4. Node 20 or later (DIR-151401-7897): the golden image's Node is 18.19, and tools need 20++#    (@puppeteer/browsers, hero-studio, current npm packages). The official Node 22 LTS build+#    from nodejs.org, checked against its SHASUMS256.txt, unpacked to /usr/local/lib/nodejs and+#    linked in /usr/local/bin (ahead of /usr/bin). No script is downloaded and run; the apt Node+#    stays; code-server keeps its own Node.+nmaj=$(node -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo 0)+if [ "${nmaj:-0}" -lt 20 ]; then+  nd=$(mktemp -d); base=https://nodejs.org/dist/latest-v22.x+  if curl -fsSL "$base/SHASUMS256.txt" -o "$nd/SUMS" && f=$(grep -oE 'node-v22[0-9.]+-linux-x64\.tar\.xz' "$nd/SUMS" | head -1) && [ -n "$f" ] \+     && curl -fsSL "$base/$f" -o "$nd/$f" && (cd "$nd" && grep " $f\$" SUMS | sha256sum -c --status) \+     && sudo -n mkdir -p /usr/local/lib/nodejs && sudo -n tar -xJf "$nd/$f" -C /usr/local/lib/nodejs \+     && d=/usr/local/lib/nodejs/${f%.tar.xz} && for b in node npm npx corepack; do sudo -n ln -sfn "$d/bin/$b" /usr/local/bin/$b; done; then+    hash -r; log+=("Node $(/usr/local/bin/node -v 2>/dev/null)")+  else log+=("Node 22 FAILED (still $(node -v 2>/dev/null))"); fi+  rm -rf "$nd"+fi+# 5. The AIs' sign-in pages open without VS Code's "Do you want to open the external website?"+#    (Kimi on Debian 13, DIR-151403-30275). code-server reads its trusted link domains from its+#    product.json; Adom's and the four AIs' sign-in sites are added (merged, idempotent; active at+#    the next code-server start).+PJ=/usr/lib/code-server/lib/vscode/product.json+if [ -f "$PJ" ]; then+  r=$(sudo -n python3 - "$PJ" <<'PYJ' 2>/dev/null+import json, os, sys+p = sys.argv[1]; d = json.load(open(p))+want = ["https://*.adom.inc", "https://kimi.ai", "https://*.kimi.ai", "https://kimi.com", "https://*.kimi.com", "https://*.moonshot.cn",+        "https://claude.ai", "https://*.claude.ai", "https://*.anthropic.com", "https://auth.openai.com", "https://chatgpt.com", "https://*.openai.com",+        "https://accounts.google.com", "https://antigravity.google", "https://*.antigravity.google"]+have = d.get("linkProtectionTrustedDomains") or []+add = [w for w in want if w not in have]+if add:+    d["linkProtectionTrustedDomains"] = have + add+    t = p + ".hlb-tmp"; json.dump(d, open(t, "w"), indent="\t"); os.chmod(t, 0o644); os.replace(t, p)+    print("added")+PYJ+)+  [ "$r" = added ] && log+=("AI sign-in sites trusted in VS Code")+fi echo "linux-platform: libx264 $x264; tz $(cat /etc/timezone 2>/dev/null || echo ?); ${log[*]:-already converged}"
host/hydrogen-host-setup.sh+11−1
@@ -12,7 +12,14 @@ #   --session wayland|x11, --with-chrome (Google Chrome for the nb bridge), --dry-run. # Ubuntu 22.04/24.04, Debian 12/13 and Fedora 40+ (and their derivatives). Prints what it does. set -u-HHS_VERSION=0.1.3+HHS_VERSION=0.1.4+# 3b. WHAT earlyoom MAY STOP (DIR-151403-30275, Debian 13 on 6 GB: it stopped code-server's+#     extension host three times, which runs every AI chat; the host is named MainThread and has+#     the highest OOM score in the workspace). Never: code-server (MainThread), Hydrogen, the+#     desktop, the AI CLIs. First: compilers, linkers, cargo, ffmpeg. Written once; a changed line+#     restarts earlyoom.+EOOM_ARGS='-r 3600 -m 4 -s 10 --avoid (^|/)(init|systemd|sshd|MainThread|code-server|adom-hydrogen|hydrogen|gnome-shell|Xwayland|Xorg|cinnamon|plasmashell|kwin_wayland|claude|codex|kimi|agy|adom-bridge)$ --prefer (^|/)(cc1|cc1plus|cc1obj|rustc|ld|ld[.]lld|ld[.]gold|lld|mold|clang|clang[+][+]|gcc|g[+][+]|cargo|make|ninja|ffmpeg|esbuild|tsc|webpack|kicad-cli)$'+ MODE=${1:-check}; shift || true JSON=0; DRY=0; WITH_CHROME=0; USERNAME=${SUDO_USER:-${PKEXEC_UID:+$(getent passwd "$PKEXEC_UID" | cut -d: -f1)}} DESKTOP=${XDG_CURRENT_DESKTOP:-}; SESSION=${XDG_SESSION_TYPE:-}@@ -144,6 +151,9 @@ apply_system() {     [ "$(state_of oom)" = ok ] || pk+=(earlyoom)     if [ ${#pk[@]} -gt 0 ]; then run apt-get install -y -q --no-install-recommends "${pk[@]}" && changed=1; fi     [ "$(state_of oom)" = ok ] || run systemctl enable --now earlyoom+    if [ -f /etc/default/earlyoom ] && ! grep -qF -- "$EOOM_ARGS" /etc/default/earlyoom; then+      printf '# Adom Hydrogen (hydrogen-host-setup): what earlyoom may stop, and what first.\nEARLYOOM_ARGS="%s"\n' "$(printf '%s' "$EOOM_ARGS")" > /etc/default/earlyoom && systemctl restart earlyoom && changed=1+    fi   elif [ "$FAMILY" = fedora ]; then     have gst-inspect-1.0 || pk+=(gstreamer1)     if [ "$(state_of h264)" != ok ]; then
package.json+2−2
@@ -5,7 +5,7 @@   "org": "adom",   "title": "Adom Hydrogen (Linux)",   "brief": "The Linux platform layer for Adom Hydrogen: Ubuntu, Debian and Fedora, the workspace and the computer.",-  "version": "0.1.2",+  "version": "0.1.3",   "description": "The Linux platform layer for Adom Hydrogen, where the workspace is a systemd-nspawn machine on the user's own Linux computer. Depends on adom/hydrogen-bootstrap and adds what is specific to Linux: the Linux render of the hydrogen-* skills, the workspace convergence hook (ffmpeg with libx264, en_US.UTF-8, earlyoom) and host/hydrogen-host-setup.sh, which Hydrogen runs on the computer with one password prompt (H.264 playback, the AppImage runtime, Flatpak and Flathub, the GNOME tray, the desktop portal, clipboard tools, fonts, the workspace time zone). One package for Ubuntu, Debian and Fedora. Sibling layers: adom/hydrogen-windows-bootstrap (WSL2) and adom/hydrogen-mac-bootstrap (Lima).",   "tags": [     "bootstrap",@@ -36,7 +36,7 @@     "skills/**",     "screenshots/**"   ],-  "changelog": "0.1.2: ships host/h264-high-sample.mp4 in the package, so host/hydrogen-host-setup.sh check can test H.264 from an install. 0.1.1: discovery triggers; the hero is John's Hero Studio image. 0.1.0: first release (DIR-150923-13629, DIR-150930-27112): host setup 0.1.3 (proved on clean Fedora 44 and Debian 13 and on Ubuntu 24.04) and the workspace hook (ffmpeg with libx264, en_US.UTF-8, earlyoom, Chrome's runtime libraries). Replaces the never-published hydrogen-ubuntu-bootstrap.",+  "changelog": "0.1.3: earlyoom never stops VS Code's extension host (every AI chat), Hydrogen or the AI CLIs, and stops build tools and ffmpeg first (DIR-151403-30275); Node 22 in the workspace when it has less than 20; the AIs' sign-in sites trusted in VS Code; host setup 0.1.4. 0.1.2: ships host/h264-high-sample.mp4 in the package, so host/hydrogen-host-setup.sh check can test H.264 from an install. 0.1.1: discovery triggers; the hero is John's Hero Studio image. 0.1.0: first release (DIR-150923-13629, DIR-150930-27112): host setup 0.1.3 (proved on clean Fedora 44 and Debian 13 and on Ubuntu 24.04) and the workspace hook (ffmpeg with libx264, en_US.UTF-8, earlyoom, Chrome's runtime libraries). Replaces the never-published hydrogen-ubuntu-bootstrap.",   "hero": {     "path": "screenshots/hero.png"   },
page.json+2−2
@@ -4,7 +4,7 @@   "type": "bootstrap",   "title": "Adom Hydrogen (Linux)",   "brief": "The Linux platform layer for Adom Hydrogen: Ubuntu, Debian and Fedora, the workspace and the computer.",-  "version": "0.1.2",+  "version": "0.1.3",   "hero": {     "type": "image",     "path": "screenshots/hero.png"@@ -68,5 +68,5 @@     "skills/**",     "screenshots/**"   ],-  "changelog": "0.1.2: ships host/h264-high-sample.mp4 in the package, so host/hydrogen-host-setup.sh check can test H.264 from an install. 0.1.1: discovery triggers; the hero is John's Hero Studio image. 0.1.0: first release (DIR-150923-13629, DIR-150930-27112): host setup 0.1.3 (proved on clean Fedora 44 and Debian 13 and on Ubuntu 24.04) and the workspace hook (ffmpeg with libx264, en_US.UTF-8, earlyoom, Chrome's runtime libraries). Replaces the never-published hydrogen-ubuntu-bootstrap."+  "changelog": "0.1.3: earlyoom never stops VS Code's extension host (every AI chat), Hydrogen or the AI CLIs, and stops build tools and ffmpeg first (DIR-151403-30275); Node 22 in the workspace when it has less than 20; the AIs' sign-in sites trusted in VS Code; host setup 0.1.4. 0.1.2: ships host/h264-high-sample.mp4 in the package, so host/hydrogen-host-setup.sh check can test H.264 from an install. 0.1.1: discovery triggers; the hero is John's Hero Studio image. 0.1.0: first release (DIR-150923-13629, DIR-150930-27112): host setup 0.1.3 (proved on clean Fedora 44 and Debian 13 and on Ubuntu 24.04) and the workspace hook (ffmpeg with libx264, en_US.UTF-8, earlyoom, Chrome's runtime libraries). Replaces the never-published hydrogen-ubuntu-bootstrap." }\ No newline at end of file