# Remote Setup Session Log (2026-06-04)

Environment: CachyOS (desktop) ↔ Debian (backend)
Debian: 192.168.1.50 (debian-ai, RTX 2080 Ti)
CachyOS: 192.168.1.111 (raymond, RTX 3070)
Hermes v0.15.1 (v2026.5.29)

## Error Sequence

### 1. Missing X server (SSH session)
```
[hermes] remote display detected (ssh-session); disabling GPU hardware acceleration to prevent flicker
[23685:0604/195543.863074:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:256] Missing X server or $DISPLAY
[23685:0604/195543.863098:ERROR:ui/aura/env.cc:257] The platform failed to initialize.  Exiting.
```
**Fix:** Run from a desktop terminal (KDE/GNOME), not SSH.

### 2. 401 Unauthorized (stale token)
```
Error: 401: {"detail":"Unauthorized"}
```
**Fix:** Re-fetch token from dashboard HTML and update connection.json.

### 3. Unknown log file: gui (cosmetic)
```
Error: 400: {"detail":"Unknown log file: gui"}
```
**Cause:** Desktop app tails a "gui" log that doesn't exist on the remote dashboard. Non-fatal.

### 4. Dashboard refused to bind 0.0.0.0 (no --insecure)
```
Refusing to bind dashboard to 0.0.0.0 — the OAuth auth gate engages on non-loopback binds,
but no auth providers are registered and no bundled plugin reported a reason
```
**Root cause:** The basic auth provider (`HERMES_DASHBOARD_BASIC_AUTH_*` env vars) is documented but NOT implemented in v0.15.1 code. The only bundled provider is `nous` OAuth (requires Portal client_id). Must use `--insecure`.

### 5. Desktop build failed on CachyOS (vite not found)
```
sh: line 1: vite: command not found
```
**Fix:** `PATH=~/.hermes/hermes-agent/node_modules/.bin:$PATH npm run pack`

### 6. SSH heredoc fails with fish shell
```
fish: Expected a string, but found a redirection
```
**Workaround:** Write file locally, then `scp` to target. Don't use heredocs over SSH to fish.

## Token Extraction
```bash
# On the dashboard host (Debian):
curl -s http://127.0.0.1:9119/ | grep -oP '__HERMES_SESSION_TOKEN__=*** head -1

# Result format (without surrounding grep or similar):
2OcuQ_vnGJQkkV8WdW_2qdNg0hLDrmptQH6FTpz8gWE
```

## Service Unit (working systemd unit)
```ini
[Unit]
Description=Hermes Agent Dashboard - Remote Desktop Gateway
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/home/rurouni/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main dashboard --port 9119 --host 0.0.0.0 --insecure --tui
WorkingDirectory=/home/rurouni/.hermes
Environment=PATH=/home/rurouni/.hermes/hermes-agent/venv/bin:/usr/bin:/usr/local/bin
Environment=HERMES_HOME=/home/rurouni/.hermes
EnvironmentFile=%h/.hermes/.env
Restart=always
RestartSec=10

[Install]
WantedBy=default.target
```
