diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index fdfaca4..5bf130e 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -24,14 +24,35 @@ optional, explicitly enabled fallback. ## The extension is missing -Check that `metadata.json` has UUID `jarvis@qvac.local`, copy the extension into -`~/.local/share/gnome-shell/extensions/jarvis@qvac.local`, then run: +Re-run the installer so it registers the bundle through GNOME's extension +installer. The installer also keeps a copy at +`~/.local/share/gnome-shell/extensions/jarvis@qvac.local`: + +```bash +curl -fsSL https://git.ssh.surf/snxraven/gnome-jarvis/raw/branch/main/packaging/web-installer.sh | bash -s -- --enable +``` + +Then confirm `metadata.json` has UUID `jarvis@qvac.local` and run: ```bash gnome-extensions enable jarvis@qvac.local journalctl --user -b | grep -i jarvis ``` +If the extension still does not appear, log out and back in once so GNOME Shell +reloads its extension search path. + +## The service reports `203/EXEC` for `/usr/bin/node` + +Older installers wrote a fixed `/usr/bin/node` path. Re-run the current web +installer; it records the Node executable found in the installing user's PATH +when it writes the user service. Check the result with: + +```bash +systemctl --user cat jarvisd.service | grep ExecStart +command -v node +``` + ## The daemon restarts Inspect `journalctl --user -u jarvisd.service`. Common causes are Node version, diff --git a/packaging/first-run.sh b/packaging/first-run.sh index c1ac0ac..e1edab4 100755 --- a/packaging/first-run.sh +++ b/packaging/first-run.sh @@ -5,11 +5,15 @@ cd "${ROOT_DIR}" echo "JARVIS-QVAC first-run setup" echo "The daemon is GPU-gated and keeps QVAC behind one master owner." echo -echo "[1/4] GPU and QVAC preflight" +echo "[1/5] GPU and QVAC preflight" npm run gpu-doctor || true -npm run qvac:doctor || true +if command -v timeout >/dev/null; then + timeout --foreground 30s npm run qvac:doctor || echo "QVAC doctor timed out or reported an unavailable host dependency; continuing with local setup." +else + npm run qvac:doctor || true +fi echo -echo "[2/4] Microphone and PipeWire preflight" +echo "[2/5] Microphone and PipeWire preflight" npm run voice-doctor || true echo echo "[3/5] Wake phrase and model profile" diff --git a/packaging/install.sh b/packaging/install.sh index 814a166..2e17639 100755 --- a/packaging/install.sh +++ b/packaging/install.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +NODE_BIN="$(command -v node || true)" +if [[ -z "${NODE_BIN}" ]]; then + echo "Node.js is required" >&2 + exit 1 +fi +command -v zip >/dev/null || { echo "zip is required to register the GNOME extension" >&2; exit 1; } APP_DIR="${HOME}/.local/share/jarvis-qvac" EXT_DIR="${HOME}/.local/share/gnome-shell/extensions/jarvis@qvac.local" CONFIG_DIR="${HOME}/.config/jarvis" @@ -12,8 +18,16 @@ if [[ ! -d "${APP_DIR}/node_modules" ]]; then fi rm -rf "${EXT_DIR}" mkdir -p "${EXT_DIR}" -cp -a "${ROOT_DIR}/apps/gnome-extension/jarvis@qvac.local/." "${EXT_DIR}/" -cp "${ROOT_DIR}/packaging/jarvisd.service" "${HOME}/.config/systemd/user/jarvisd.service" +EXT_ZIP="$(mktemp "${TMPDIR:-/tmp}/jarvis-extension.XXXXXX.zip")" +cleanup_ext() { rm -f "${EXT_ZIP}"; } +trap cleanup_ext EXIT +( cd "${ROOT_DIR}/apps/gnome-extension" && zip -q -r "${EXT_ZIP}" "jarvis@qvac.local" ) +if command -v gnome-extensions >/dev/null && gnome-extensions install --force "${EXT_ZIP}" >/dev/null 2>&1; then + : +else + cp -a "${ROOT_DIR}/apps/gnome-extension/jarvis@qvac.local/." "${EXT_DIR}/" +fi +sed "s#__JARVIS_NODE__#${NODE_BIN}#" "${ROOT_DIR}/packaging/jarvisd.service" > "${HOME}/.config/systemd/user/jarvisd.service" if [[ ! -f "${CONFIG_DIR}/qvac.config.json" ]]; then sed "s#__JARVIS_CACHE__#${CACHE_DIR}#g" "${ROOT_DIR}/packaging/qvac.config.template.json" > "${CONFIG_DIR}/qvac.config.json" fi diff --git a/packaging/jarvisd.service b/packaging/jarvisd.service index d52a159..b3651ad 100644 --- a/packaging/jarvisd.service +++ b/packaging/jarvisd.service @@ -6,7 +6,7 @@ Wants=pipewire.service [Service] Type=simple WorkingDirectory=%h/.local/share/jarvis-qvac -ExecStart=/usr/bin/node %h/.local/share/jarvis-qvac/daemon/index.js +ExecStart=__JARVIS_NODE__ %h/.local/share/jarvis-qvac/daemon/index.js Environment=QVAC_CONFIG_PATH=%h/.config/jarvis/qvac.config.json Environment=JARVIS_GPU_REQUIRED=1 Environment=JARVIS_QVAC_OWNER=jarvisd