Anthropic ships the Claude desktop app for Linux only through its own Debian repository, so the package repacks the deb the way openai-codex-desktop does: extract data.tar.xz, replace the bare /usr/bin symlink with a launcher that asks Chromium for Wayland directly, and keep the vendor copyright as the license. Updates come through the declarative "debian" upstream provider: the apt Packages index names the newest version, and the per-architecture pool debs are hashed when one appears. Verified by pinning 1.44121.2 and watching bin/sync-upstream rewrite it back to 1.46388.2 byte-identically.
33 lines
1.1 KiB
Bash
33 lines
1.1 KiB
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
user_flags=()
|
|
config_home="${XDG_CONFIG_HOME:-}"
|
|
[[ -n "$config_home" || -z "${HOME:-}" ]] || config_home="$HOME/.config"
|
|
flags_file="${config_home:+$config_home/claude-desktop-flags.conf}"
|
|
|
|
if [[ -n "$flags_file" && -f "$flags_file" && -r "$flags_file" ]]; then
|
|
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
line="${line%%#*}"
|
|
[[ -n "${line//[[:space:]]/}" ]] || continue
|
|
read -r -a flags <<<"$line"
|
|
user_flags+=("${flags[@]}")
|
|
done <"$flags_file"
|
|
fi
|
|
|
|
# Chromium's own Ozone detection falls back to XWayland often enough to matter,
|
|
# and the result is a blurry window on every scaled display. Ask for Wayland
|
|
# directly, unless the user has already picked a platform themselves.
|
|
platform_flags=()
|
|
if [[ -n "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == wayland ]]; then
|
|
platform_flags=(--ozone-platform=wayland)
|
|
|
|
for flag in "${user_flags[@]}" "$@"; do
|
|
case "$flag" in
|
|
--ozone-platform=* | --ozone-platform-hint=*) platform_flags=() ;;
|
|
esac
|
|
done
|
|
fi
|
|
|
|
exec /usr/lib/claude-desktop/claude-desktop "${platform_flags[@]}" "${user_flags[@]}" "$@"
|