#!/bin/bash # Installs Centhead on Linux (64-bit). Run it with: curl -fsSL https://centhead.com/get/install-linux.sh | bash # What it does, nothing else: downloads Centhead-linux-x64.tar.gz from centhead.com/get, checks its SHA-256 against centhead.com/get/latest.json, unpacks it # into ~/.local/share/centhead, makes it runnable, adds a "centhead" command in ~/.local/bin and a menu entry. No root needed. Read it before you run it. set -euo pipefail BASE="https://centhead.com/get" FILE="Centhead-linux-x64.tar.gz" [ "$(uname -m)" = "x86_64" ] || { echo "This build is for 64-bit Intel/AMD processors (x86_64). See https://centhead.com/download"; exit 1; } TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT echo "Centhead for Linux: looking up the newest version..." curl -fsSL "$BASE/latest.json" -o "$TMP/latest.json" WANT="$(tr -d ' \n\r\t' < "$TMP/latest.json" | sed -n "s/.*\"$FILE\":{\"sha256\":\"\([0-9a-f]\{64\}\)\".*/\1/p")" [ -n "$WANT" ] || { echo "No $FILE in the newest release yet. See https://centhead.com/download"; exit 1; } echo "Downloading $FILE ..." curl -fL --progress-bar "$BASE/$FILE" -o "$TMP/$FILE" GOT="$(sha256sum "$TMP/$FILE" | cut -d' ' -f1)" if [ "$GOT" != "$WANT" ]; then echo "The download does not match its published fingerprint. Nothing was installed."; exit 1; fi APP="$HOME/.local/share/centhead" rm -rf "$APP"; mkdir -p "$APP" "$HOME/.local/bin" "$HOME/.local/share/applications" tar -xzf "$TMP/$FILE" -C "$APP" chmod +x "$APP/Centhead" "$APP/chrome_crashpad_handler" 2>/dev/null || true cat > "$HOME/.local/bin/centhead" <<'LAUNCH' #!/bin/bash # Chromium's sandbox needs unprivileged user namespaces; some systems (for example Ubuntu 24.04 by default) switch them off. Only then is it started without the sandbox. APP="$HOME/.local/share/centhead" FLAGS="" if ! unshare --user true 2>/dev/null; then FLAGS="--no-sandbox"; fi exec "$APP/Centhead" $FLAGS "$@" LAUNCH chmod +x "$HOME/.local/bin/centhead" cat > "$HOME/.local/share/applications/centhead.desktop" <