Files
clide/deploy/install-clide-web.sh
T
jpmschweitzerandClaude Opus 4.6 27b19d4698 feat: Nerd Font support, clipboard paste, and PTY environment fixes
- Add ttyd-nerd-font submodule with embedded JetBrains Mono Nerd Font
  for proper icon rendering in browser via ttyd
- Add Ctrl+Shift+V / Shift+Insert paste support in ttyd frontend
- Strip Zellij env vars from PTY child processes to prevent workspace
  terminal from inheriting Zellij session context
- Launch PTY commands through login shell for proper PATH resolution
- Use /etc/passwd shell lookup instead of $SHELL (Zellij overrides it)
- Soften ANSI 256-color palette to match modern dark themes
- Handle Nerd Font PUA glyphs as width 1 in pyte terminal emulator
- Fix brightmagenta typo in pyte graphics
- Update install script to build ttyd from submodule source
- Add web deployment TODO items for image paste and context menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 02:44:08 +01:00

80 lines
2.4 KiB
Bash

#!/bin/bash
# Clide Web-Access Layer Installation Script
# Run with: sudo bash deploy/install-clide-web.sh
set -e
echo "=== Clide Web-Access Layer Installation ==="
echo ""
# Check if running as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root (sudo)"
exit 1
fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SUDO_USER="${SUDO_USER:-$(logname)}"
USER_HOME=$(eval echo ~"$SUDO_USER")
echo "[1/6] Building ttyd (with Nerd Font support)..."
TTYD_SRC="$SCRIPT_DIR/ttyd-nerd-font"
if [[ ! -d "$TTYD_SRC/src" ]]; then
echo "Error: ttyd-nerd-font submodule not initialized."
echo "Run: git submodule update --init deploy/ttyd-nerd-font"
exit 1
fi
mkdir -p "$TTYD_SRC/build"
cd "$TTYD_SRC/build"
cmake .. -DCMAKE_BUILD_TYPE=Release >/dev/null 2>&1
make -j"$(nproc)" >/dev/null 2>&1
cp "$TTYD_SRC/build/ttyd" /usr/local/bin/ttyd
chmod +x /usr/local/bin/ttyd
cd "$SCRIPT_DIR"
ttyd --version
echo ""
echo "[2/6] Installing zellij..."
curl -L https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz | tar -xz -C /usr/local/bin
chmod +x /usr/local/bin/zellij
zellij --version
echo ""
echo "[3/6] Installing clide-launcher..."
cp "$SCRIPT_DIR/clide-launcher" /usr/local/bin/clide-launcher
chmod +x /usr/local/bin/clide-launcher
echo ""
echo "[4/6] Installing Zellij config..."
ZELLIJ_CONFIG_DIR="$USER_HOME/.config/zellij"
ZELLIJ_LAYOUTS_DIR="$ZELLIJ_CONFIG_DIR/layouts"
mkdir -p "$ZELLIJ_LAYOUTS_DIR"
cp "$SCRIPT_DIR/zellij/config.kdl" "$ZELLIJ_CONFIG_DIR/config.kdl"
cp "$SCRIPT_DIR/zellij/bare.kdl" "$ZELLIJ_LAYOUTS_DIR/bare.kdl"
chown -R "$SUDO_USER:$SUDO_USER" "$ZELLIJ_CONFIG_DIR"
echo ""
echo "[5/6] Installing systemd service..."
cp "$SCRIPT_DIR/clide-web.service" /etc/systemd/system/clide-web.service
echo ""
echo "[6/6] Starting service..."
systemctl daemon-reload
systemctl enable clide-web
systemctl start clide-web
echo ""
echo "=== Installation Complete ==="
echo ""
echo "Status:"
systemctl status clide-web --no-pager || true
echo ""
echo "Port check:"
ss -tlnp | grep 8888 || echo "Warning: Port 8888 not listening yet"
echo ""
echo "Access:"
echo " Local: http://localhost:8888"
echo " Direct: http://localhost:8888?project=system-management"
echo " External: https://code.schweitz.net?project=system-management"
echo ""
echo "Don't forget to update NPM to enable WebSocket support for code.schweitz.net"