Files
hassio-addons/claude_desktop/rootfs/defaults/autostart
alexbelgium f0097ad467 fix(claude_desktop): persist sign-in via basic password store, fix GPU perms boot failure
Session logs on a live install showed safeStorage unavailable (no keyring daemon
behind the forced gnome-libsecret store) causing recurring "sign in again" prompts,
and the resulting stale session parking the cowork/dispatch bridge — surfacing as
the desktop showing offline in the Claude app when opened from mobile first.
Switch to --password-store=basic (no daemon, no first-boot prompt) and sync the
persistent openbox autostart from the image on every boot so the fix reaches
existing installs, not just fresh ones.

Also fix 21-gpu_permissions.sh exiting 2 at boot: getent's expected exit-2 for an
as-yet-unnamed DRI group, combined with bashio's pipefail + set -e, skipped the
script's own unnamed-group fallback before it could run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 08:19:53 +02:00

18 lines
1.3 KiB
Bash

#!/usr/bin/env sh
# Persist Claude Desktop sign-in across restarts.
# Claude Desktop (Electron) stores its auth token via safeStorage. On Linux the libsecret
# backend needs a running Secret Service (gnome-keyring), but gnome-keyring is intentionally
# not installed in this image: on first boot it prompts for a keyring password, which blocks
# Claude Desktop from ever launching. Without the daemon, forcing --password-store=gnome-libsecret
# leaves safeStorage.isEncryptionAvailable()=false, so the session can never be stored — that
# surfaced as recurring "sign in again" prompts and (because the stale session also fails the
# elevated-access OAuth check) the Claude app's dispatch tab showing this desktop as offline.
#
# --password-store=basic uses Electron's built-in fixed-key store instead: no daemon, no
# prompt, and isEncryptionAvailable() is always true. Secrets land under $HOME/.config/Claude,
# and HOME=/data/data is persistent add-on storage, so the saved sign-in survives restarts.
# Headroom is intentionally not injected into the Desktop process: Claude Desktop
# force-overrides ANTHROPIC_BASE_URL (headroom #869), so Desktop uses the registered Headroom
# MCP tools instead.
exec claude-desktop --no-sandbox --disable-dev-shm-usage --password-store=basic