diff --git a/arch-setup.sh b/arch-setup.sh index e6d70c6..06da992 100755 --- a/arch-setup.sh +++ b/arch-setup.sh @@ -107,11 +107,14 @@ if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then fi # Minimal host package set — omaterm installs everything else it needs -# (git, tmux, agents, tailscale all live inside its container) +# (git, tmux, agents, tailscale all live inside its container). +# kitty-terminfo: without it, SSHing in from kitty gives +# "'xterm-kitty': unknown terminal type" and the omaterm installer dies pacman -S --noconfirm --needed \ ufw \ fail2ban \ curl \ + kitty-terminfo \ docker # Docker must be running before omaterm installs — the new omaterm is @@ -329,6 +332,23 @@ else warn "Image pre-pull failed — the omaterm installer will pull it instead" fi +# Installer wrapper: `curl | bash` makes stdin the pipe, so the installer's +# final `docker run -it` attach fails with "stdin is not a terminal". +# Download-then-run keeps stdin on the real TTY. +cat > /home/$DEPLOY_USER/install-omaterm << 'OMAEOF' +#!/bin/bash +# Fetch and run the omaterm installer with a real TTY on stdin +set -euo pipefail +tmp=$(mktemp) +trap 'rm -f "$tmp"' EXIT +curl -fsSL https://omaterm.org/install -o "$tmp" +bash "$tmp" +OMAEOF + +chown $DEPLOY_USER:$DEPLOY_USER /home/$DEPLOY_USER/install-omaterm +chmod +x /home/$DEPLOY_USER/install-omaterm +log "Installer wrapper created at ~/install-omaterm" + # ============================================================================= # SWAP (2GB) # ============================================================================= @@ -458,13 +478,13 @@ echo "" echo -e " ${CYAN}────── COPY ABOVE THIS LINE ──────${NC}" echo "" echo " 2. Test SSH: ssh $SSH_ALIAS" -echo " 3. Install omaterm (interactive SSH session, NOT a one-liner —" -echo " the installer needs a real terminal with TERM set):" +echo " 3. Install omaterm (from an interactive SSH session — do NOT" +echo " curl|bash it, the container attach step needs a real TTY):" echo "" echo -e " ${CYAN}ssh $SSH_ALIAS${NC}" -echo -e " ${CYAN}curl -fsSL https://omaterm.org/install | bash${NC}" +echo -e " ${CYAN}./install-omaterm${NC}" echo "" -echo " If it complains about the terminal: TERM=xterm-256color first." +echo " If it complains about the terminal: TERM=xterm-256color ./install-omaterm" echo "" echo " Once step 1 is done, Claude Code can control this server." echo ""