Portable Helium browser with Auto-Updates

Non release banter
Kulle
Warlord
Warlord
Posts: 721
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Portable Helium browser with Auto-Updates

Post#1 by Kulle » 18 Apr 2026, 09:36

Portable Helium browser with Auto-Updates

Create a folder named helium_browser on the USB stick or hard drive.
Place the script file named run_helium inside and make it executable (chmod +x run_helium)

On first run, the script downloads the latest helium browser, creates the profile folder, and launches the portable version.
The script always checks for updates before launching helium browser.
All settings/bookmarks persist in the profiles folder.
Here is the script run_helium :

Code: Select all

#!/bin/bash
set -euo pipefail

cd "$(dirname "$0")"

notify-send -t 1000 -i dialog-information "Preparing Helium..." "One moment please"

# API call
API_URL="https://api.github.com/repos/imputnet/helium-linux/releases/latest"
API_RESPONSE=$(curl -sS "$API_URL")

# Extract version
LATEST_VERSION=$(echo "$API_RESPONSE" | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')

# Extract download URL
URL=$(echo "$API_RESPONSE" | sed -n 's/.*"browser_download_url": *"\([^"]*x86_64[^"]*\.AppImage\)".*/\1/p')

echo "latest version: $LATEST_VERSION"

UPDATE_AND_EXTRACT() {
    if [ -z "$LATEST_VERSION" ] || [ -z "$URL" ]; then
        echo "Note: GitHub API not reachable. Skipping update check."
        return 0
    fi

    echo "Downloading Helium version $LATEST_VERSION "

     TEMP_FILE="/tmp/Helium_${LATEST_VERSION}.AppImage"
     if curl -L --fail --progress-bar "$URL" -o "$TEMP_FILE"; then
        chmod +x "$TEMP_FILE"
        rm -f Helium.AppImage
        rm -rf squashfs-root

        mv "$TEMP_FILE" Helium.AppImage
        ./Helium.AppImage --appimage-extract
        rm -f Helium.AppImage 
        echo "$LATEST_VERSION" > .version
        echo "Update to version $LATEST_VERSION completed."
        return 0
    else
        echo "Download failed."
        rm -f "$TEMP_FILE"
        return 1
    fi
}

if [ -n "$LATEST_VERSION" ]; then
    if [ ! -d "squashfs-root" ] || [ ! -f ".version" ] || [ "$(cat .version)" != "$LATEST_VERSION" ]; then
        UPDATE_AND_EXTRACT || exit 1
    else
        echo "Helium is up to date (version $LATEST_VERSION)."
    fi
else
    echo "Could not check version. Starting existing installation..."
fi

mkdir -p profile/.shader_cache
export MESA_SHADER_CACHE_DIR="$(pwd)/profile/.shader_cache"

if [ -d "squashfs-root" ]; then
    ./squashfs-root/AppRun --user-data-dir="$(pwd)/profile" --password-store=basic --start-maximized https://duckduckgo.com 2>/dev/null
else
    echo "Error: Helium has not been successfully downloaded/extracted yet."
    exit 1
fi

exit 0
Helium Browser Overview:
Built on Ungoogled Chromium to reduce Google tracking.
Helium proxies Chrome Web Store requests through its own services.
Integrated uBlock Origin for a cleaner browsing experience.
Lightweight and fast, with no background telemetry.
Includes a native split-view mode and many !bang shortcuts for faster searching.
WebRTC is disabled by default.