diff --git a/claude_desktop/CHANGELOG.md b/claude_desktop/CHANGELOG.md index 3a36c5e444..532e04f811 100644 --- a/claude_desktop/CHANGELOG.md +++ b/claude_desktop/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.6 (07-07-2026) + +- Fix default desktop launch failing when `install_headroom` is enabled (the default). `headroom wrap` only supports coding-agent CLIs (`claude`, `codex`, ...) with agent arguments after `--`, so wrapping `claude-desktop` produced an invalid command that left the app unlaunched. Keep the plain Claude Desktop launch and instead just expose `headroom` with a usage hint. +- Make the autostart resilient: if a custom/wrapped launch command fails to start, fall back to the default Claude Desktop launch so the app still comes up. + ## 1.5 (07-07-2026) - Change the default Claude Desktop data location to `/data/data`. diff --git a/claude_desktop/config.yaml b/claude_desktop/config.yaml index 8be3ea09f0..40520d3614 100644 --- a/claude_desktop/config.yaml +++ b/claude_desktop/config.yaml @@ -90,5 +90,5 @@ slug: claude_desktop tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: "1.5" +version: "1.6" video: true diff --git a/claude_desktop/rootfs/defaults/autostart b/claude_desktop/rootfs/defaults/autostart index fe730c47cb..99e73bf659 100644 --- a/claude_desktop/rootfs/defaults/autostart +++ b/claude_desktop/rootfs/defaults/autostart @@ -14,8 +14,18 @@ dbus-update-activation-environment --all >/dev/null 2>&1 || true # --password-store=gnome-libsecret forces Electron onto the libsecret backend instead of # falling back to plaintext (and warning that the sign-in will not be saved). CLAUDE_DESKTOP_COMMAND_FILE="/tmp/claude-desktop-command" +DEFAULT_CLAUDE_DESKTOP_COMMAND="claude-desktop --no-sandbox --disable-dev-shm-usage --password-store=gnome-libsecret" if [ -s "$CLAUDE_DESKTOP_COMMAND_FILE" ]; then - sh -c "$(cat "$CLAUDE_DESKTOP_COMMAND_FILE")" + CLAUDE_DESKTOP_COMMAND="$(cat "$CLAUDE_DESKTOP_COMMAND_FILE")" else - claude-desktop --no-sandbox --disable-dev-shm-usage --password-store=gnome-libsecret + CLAUDE_DESKTOP_COMMAND="$DEFAULT_CLAUDE_DESKTOP_COMMAND" +fi + +# Launch the configured command. If a custom/wrapped command fails to start, fall back to +# the plain Claude Desktop launch so the desktop app still comes up for the user. +if ! sh -c "$CLAUDE_DESKTOP_COMMAND"; then + if [ "$CLAUDE_DESKTOP_COMMAND" != "$DEFAULT_CLAUDE_DESKTOP_COMMAND" ]; then + echo "autostart: '$CLAUDE_DESKTOP_COMMAND' failed; falling back to default Claude Desktop launch" >&2 + exec sh -c "$DEFAULT_CLAUDE_DESKTOP_COMMAND" + fi fi diff --git a/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh b/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh index b160340676..6a048783c6 100755 --- a/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh +++ b/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh @@ -10,8 +10,11 @@ printf '%s\n' "$DEFAULT_CLAUDE_DESKTOP_COMMAND" > "$CLAUDE_DESKTOP_COMMAND_FILE" if bashio::config.true 'install_headroom'; then if command -v headroom &> /dev/null; then - bashio::log.info "headroom $(headroom --version 2> /dev/null || true) available; launching Claude Desktop through headroom" - printf '%s\n' "headroom wrap $DEFAULT_CLAUDE_DESKTOP_COMMAND" > "$CLAUDE_DESKTOP_COMMAND_FILE" + # headroom "wrap" only supports coding-agent CLIs (claude|codex|cursor|...), + # not the Claude Desktop Electron app. Wrapping "claude-desktop" produced an + # invalid command that left the desktop app unlaunched, so keep the default + # launch untouched and just expose headroom for the user to wrap Claude Code. + bashio::log.info "headroom $(headroom --version 2> /dev/null || true) available; run 'headroom wrap claude' in a terminal to route Claude Code through headroom" else bashio::log.warning "headroom is not available" fi