mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-01 05:52:42 +02:00
claude_desktop: don't wrap desktop launch with invalid headroom command
install_headroom defaults to true and headroom is baked into the image, so 82-claude_tools.sh rewrote the desktop launch to "headroom wrap claude-desktop --no-sandbox ...". headroom "wrap" only accepts coding-agent CLIs (claude, codex, cursor, ...) and expects agent arguments after a "--" separator, so "claude-desktop" plus the Electron flags is an invalid wrap target/options. The autostart ran only that command with no fallback, leaving the desktop app unlaunched for default users. - Keep the plain claude-desktop launch; just expose headroom with a usage hint (matches the documented "make headroom available and log a usage hint"). - Harden autostart to fall back to the default launch if a custom/wrapped command fails to start. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgMcG1QjsSHcDQBxgPpRUw
This commit is contained in:
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user