← paintstorm-distrobox-legacy

Add automatic Paintstorm download and improve installation feedback

116854c8d9ee480de16b38b6a20819807ba52d00 · Claude · Jan 24, 2026 17:50

Changes:
- Move paintstorm-icon.png to paintstorm-setup/ folder
- Add automatic download from official website if installer not found
- Extract .tar.gz archive and use .run file
- Show detailed post-installation overview with files created on host
- Include basic distrobox commands in installation output
- Update desktop entry to use standard icon name format
- Update READMEs to reflect automatic download capability

Installation now:
- Downloads Paintstorm v2.50 automatically from paintstormstudio.com
- Shows all files added to host system (~/.local/share/applications/, icons, etc.)
- Displays useful distrobox commands for managing the container
- Provides clearer feedback about native HID vs OTD

Tested on: Arch Linux with Huion G930L

+191 −80 · 4 files changed

  • README.md +8 −6
  • paintstorm-setup/README.md +54 −6
  • paintstorm-icon.png => paintstorm-setup/paintstorm-icon.png binary
  • paintstorm-setup/paintstorm-install-distrobox.sh +129 −68
diff --git a/README.md b/README.md
index ed7aff7..de46d13 100644
--- a/README.md
+++ b/README.md
@@ -44,18 +44,20 @@ sudo pacman -S xbindkeys xdotool
 
 1. **Clone or download this repository**
 
-2. **Download Paintstorm Studio**
-   - Get `Paintstorm_linux_v2.50.run` from the official website
-   - Place it in the `paintstorm-setup/` directory
-
-3. **Run the installation script**
+2. **Run the installation script**
    ```bash
    cd paintstorm-setup/
    chmod +x paintstorm-install-distrobox.sh
    ./paintstorm-install-distrobox.sh
    ```
 
-4. **Launch Paintstorm**
+   The script will automatically:
+   - Download Paintstorm v2.50 from the official website
+   - Create the distrobox container
+   - Install all dependencies
+   - Set up desktop integration
+
+3. **Launch Paintstorm**
    - From application menu: Graphics → Paintstorm Studio
    - Or from terminal: `~/paintstorm`
 
diff --git a/paintstorm-setup/README.md b/paintstorm-setup/README.md
index 5f974d7..4861f1c 100644
--- a/paintstorm-setup/README.md
+++ b/paintstorm-setup/README.md
@@ -7,10 +7,14 @@ This folder contains the core scripts for installing and managing Paintstorm Stu
 ### Installation
 - **`paintstorm-install-distrobox.sh`** - Main installation script (run this first)
   - Creates Ubuntu 20.04 distrobox container
+  - Downloads Paintstorm v2.50 automatically (if not found locally)
   - Builds GLEW 1.13.0 from source
   - Installs all dependencies
   - Configures tablet support (hidraw passthrough)
-  - Creates desktop launcher
+  - Creates desktop launcher and icon
+
+- **`paintstorm-icon.png`** - Application icon (256x256)
+  - Installed to `~/.local/share/icons/hicolor/256x256/apps/paintstorm.png`
 
 ### Supporting Scripts
 - **`container-setup.sh`** - Container environment setup
@@ -43,10 +47,25 @@ cd paintstorm-setup/
 
 The script will:
 1. Create the distrobox container
-2. Install all dependencies
-3. Extract and install Paintstorm
-4. Create launcher scripts
-5. Set up desktop integration
+2. Download Paintstorm v2.50 from official website (if not found locally)
+3. Install all dependencies
+4. Extract and install Paintstorm
+5. Create launcher scripts
+6. Set up desktop integration (icon + desktop entry)
+
+### Files Created on Host System
+
+After installation, the following files are added to your home directory:
+
+**Launcher:**
+- `~/paintstorm` - Main launcher script
+
+**Desktop Integration:**
+- `~/.local/share/applications/paintstorm.desktop` - Desktop entry
+- `~/.local/share/icons/hicolor/256x256/apps/paintstorm.png` - Application icon
+
+**Management:**
+- `~/paintstorm-manage.sh` - Container management utilities
 
 ### After Installation
 
@@ -72,9 +91,11 @@ cd paintstorm-setup/
 - Distrobox installed
 - Podman or Docker
 - X11 display server
-- Paintstorm_linux_v2.50.run installer file
+- wget or curl (for downloading Paintstorm)
 - Optional: NVIDIA GPU for hardware acceleration
 
+**Note:** The installer will automatically download Paintstorm v2.50 from the official website if not found locally.
+
 ## Tablet Support
 
 The installer automatically detects and passes through:
@@ -90,6 +111,33 @@ This enables full tablet support with:
 
 For button mapping, see: `../native-hid-tablet-mapping/`
 
+## Basic Distrobox Commands
+
+**Enter container:**
+```bash
+distrobox enter paintstorm-legacy
+```
+
+**Stop container:**
+```bash
+distrobox stop paintstorm-legacy
+```
+
+**Remove container:**
+```bash
+distrobox rm paintstorm-legacy
+```
+
+**List all containers:**
+```bash
+distrobox list
+```
+
+**Container info:**
+```bash
+podman ps -a | grep paintstorm-legacy
+```
+
 ## Troubleshooting
 
 ### Container doesn't start
diff --git a/paintstorm-icon.png b/paintstorm-setup/paintstorm-icon.png
similarity index 100%
rename from paintstorm-icon.png
rename to paintstorm-setup/paintstorm-icon.png
diff --git a/paintstorm-setup/paintstorm-install-distrobox.sh b/paintstorm-setup/paintstorm-install-distrobox.sh
index 88eef5e..5186c02 100755
--- a/paintstorm-setup/paintstorm-install-distrobox.sh
+++ b/paintstorm-setup/paintstorm-install-distrobox.sh
@@ -163,13 +163,16 @@ echo ""
 
 # Auto-detect installer
 INSTALLER_PATH=""
+DOWNLOAD_URL="https://www.paintstormstudio.com/Paintstorm_linux_v2.50.run.tar.gz"
+
+# Check if .run file already exists locally
 SEARCH_PATHS=(
     "$(pwd)/Paintstorm_linux_v2.50.run"
     "$HOME/Downloads/Paintstorm_linux_v2.50.run"
     "$HOME/Paintstorm_linux_v2.50.run"
+    "/tmp/Paintstorm_linux_v2.50.run"
 )
 
-# Check specific paths
 for path in "${SEARCH_PATHS[@]}"; do
     if [ -f "$path" ]; then
         INSTALLER_PATH="$path"
@@ -187,75 +190,86 @@ if [ -z "$INSTALLER_PATH" ]; then
     fi
 fi
 
-# Install if found
-if [ -n "$INSTALLER_PATH" ]; then
-    echo ""
-    echo "Installing Paintstorm..."
+# Download if not found
+if [ -z "$INSTALLER_PATH" ]; then
+    echo -e "${BLUE}Downloading Paintstorm Studio v2.50...${NC}"
+    echo "Source: $DOWNLOAD_URL"
 
-    # Extract to a clean temp directory
-    EXTRACT_DIR="/tmp/paintstorm-extract-$$"
-    mkdir -p "$EXTRACT_DIR"
+    DOWNLOAD_DIR="/tmp/paintstorm-download-$$"
+    mkdir -p "$DOWNLOAD_DIR"
+    cd "$DOWNLOAD_DIR"
 
-    echo "Extracting installer..."
-    # We use --target, but we will find the actual folder dynamically
-    sh "$INSTALLER_PATH" --noexec --target "$EXTRACT_DIR"
+    if command -v wget &> /dev/null; then
+        wget "$DOWNLOAD_URL" -O Paintstorm_linux_v2.50.run.tar.gz
+    elif command -v curl &> /dev/null; then
+        curl -L "$DOWNLOAD_URL" -o Paintstorm_linux_v2.50.run.tar.gz
+    else
+        echo -e "${RED}Error: Neither wget nor curl is available${NC}"
+        echo "Install wget with: sudo pacman -S wget"
+        exit 1
+    fi
 
-    # Dynamically find where the 'paintstorm' binary folder is
-    ACTUAL_SRC=$(find "$EXTRACT_DIR" -type d -name "paintstorm" | head -n 1)
+    echo -e "${BLUE}Extracting tar.gz archive...${NC}"
+    tar -xzf Paintstorm_linux_v2.50.run.tar.gz
 
-    if [ -z "$ACTUAL_SRC" ]; then
-        echo -e "${RED}Error: Extraction failed to produce a 'paintstorm' directory${NC}"
-        ls -R "$EXTRACT_DIR"
+    # Find the extracted .run file
+    INSTALLER_PATH=$(find "$DOWNLOAD_DIR" -name "*.run" -type f | head -1)
+
+    if [ -z "$INSTALLER_PATH" ]; then
+        echo -e "${RED}Error: No .run file found in archive${NC}"
+        ls -la "$DOWNLOAD_DIR"
         exit 1
     fi
 
-    echo "Copying files from $ACTUAL_SRC to container..."
-    distrobox enter "$CONTAINER_NAME" -- bash << INSTALL_CMD
-        set -e
+    echo -e "${GREEN}Extracted installer: $INSTALLER_PATH${NC}"
+fi
 
-        # Copy Paintstorm files using the dynamically found path
-        sudo cp -r "$ACTUAL_SRC/"* /usr/share/paintstorm/
+# Install
+echo ""
+echo "Installing Paintstorm..."
 
-        # Copy GLEW libraries
-        if [ -f /tmp/glew-1.13.0/lib/libGLEW.so ]; then
-            sudo cp /tmp/glew-1.13.0/lib/libGLEW.so* /usr/share/paintstorm/
-        fi
+# Extract to a clean temp directory
+EXTRACT_DIR="/tmp/paintstorm-extract-$$"
+mkdir -p "$EXTRACT_DIR"
 
-        # Fix RPATH
-        sudo patchelf --set-rpath '\$ORIGIN' /usr/share/paintstorm/Paintstorm
+echo "Extracting installer..."
+sh "$INSTALLER_PATH" --noexec --target "$EXTRACT_DIR"
 
-        # Set permissions
-        sudo chown -R \$USER:\$USER /usr/share/paintstorm
-        sudo chmod +x /usr/share/paintstorm/Paintstorm
+# Dynamically find where the 'paintstorm' binary folder is
+ACTUAL_SRC=$(find "$EXTRACT_DIR" -type d -name "paintstorm" | head -n 1)
 
-        echo "Installation complete!"
-INSTALL_CMD
+if [ -z "$ACTUAL_SRC" ]; then
+    echo -e "${RED}Error: Extraction failed to produce a 'paintstorm' directory${NC}"
+    ls -R "$EXTRACT_DIR"
+    exit 1
+fi
 
-    # Cleanup
-    rm -rf "$EXTRACT_DIR"
+echo "Copying files from $ACTUAL_SRC to container..."
+distrobox enter "$CONTAINER_NAME" -- bash << INSTALL_CMD
+    set -e
 
-else
-    echo -e "${YELLOW}Paintstorm installer not found.${NC}"
-    echo ""
-    read -p "Enter path to Paintstorm_linux_v2.50.run (or 'skip'): " user_path
-
-    if [ "$user_path" != "skip" ] && [ -f "$user_path" ]; then
-        EXTRACT_DIR="/tmp/paintstorm-extract-$$"
-        mkdir -p "$EXTRACT_DIR"
-        cd "$EXTRACT_DIR"
-        sh "$user_path" --noexec --target "$EXTRACT_DIR/paintstorm_files"
-
-        distrobox enter "$CONTAINER_NAME" -- bash << INSTALL_CMD
-            sudo cp -r "$EXTRACT_DIR/paintstorm_files/PaintstormInstall/paintstorm/"* /usr/share/paintstorm/
-            sudo cp /tmp/glew-1.13.0/lib/libGLEW.so* /usr/share/paintstorm/
-            sudo patchelf --set-rpath '\$ORIGIN' /usr/share/paintstorm/Paintstorm
-            sudo chown -R \$USER:\$USER /usr/share/paintstorm
-            sudo chmod +x /usr/share/paintstorm/Paintstorm
-INSTALL_CMD
-        rm -rf "$EXTRACT_DIR"
-    else
-        echo -e "${YELLOW}Skipping installation.${NC}"
+    # Copy Paintstorm files using the dynamically found path
+    sudo cp -r "$ACTUAL_SRC/"* /usr/share/paintstorm/
+
+    # Copy GLEW libraries
+    if [ -f /tmp/glew-1.13.0/lib/libGLEW.so ]; then
+        sudo cp /tmp/glew-1.13.0/lib/libGLEW.so* /usr/share/paintstorm/
     fi
+
+    # Fix RPATH
+    sudo patchelf --set-rpath '\$ORIGIN' /usr/share/paintstorm/Paintstorm
+
+    # Set permissions
+    sudo chown -R \$USER:\$USER /usr/share/paintstorm
+    sudo chmod +x /usr/share/paintstorm/Paintstorm
+
+    echo "Installation complete!"
+INSTALL_CMD
+
+# Cleanup
+rm -rf "$EXTRACT_DIR"
+if [ -d "/tmp/paintstorm-download-$$" ]; then
+    rm -rf "/tmp/paintstorm-download-$$"
 fi
 
 echo ""
@@ -292,8 +306,8 @@ Version=1.0
 Type=Application
 Name=Paintstorm Studio
 Comment=Digital Painting Software
-Exec=$WRAPPER_SCRIPT
-Icon=$HOME/.local/share/icons/hicolor/256x256/apps/paintstorm.png
+Exec=$HOME/paintstorm
+Icon=paintstorm
 Terminal=false
 Categories=Graphics;2DGraphics;RasterGraphics;
 MimeType=image/png;image/jpeg;image/jpg;image/bmp;image/tiff;image/psd;
@@ -311,16 +325,23 @@ EOF
     echo -e "${GREEN}Step 6: Setting up icon...${NC}"
     mkdir -p ~/.local/share/icons/hicolor/256x256/apps
 
-    # Check for paintstorm-icon.png
-    if [ -f "paintstorm-icon.png" ]; then
-        cp paintstorm-icon.png ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png
-        echo -e "${GREEN}✓ Icon installed from paintstorm-icon.png${NC}"
+    # Check for paintstorm-icon.png in multiple locations
+    ICON_INSTALLED=false
+    if [ -f "$SCRIPT_DIR/paintstorm-icon.png" ]; then
+        cp "$SCRIPT_DIR/paintstorm-icon.png" ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png
+        echo -e "${GREEN}✓ Icon installed from $SCRIPT_DIR/paintstorm-icon.png${NC}"
+        ICON_INSTALLED=true
+    elif [ -f "$(pwd)/paintstorm-icon.png" ]; then
+        cp "$(pwd)/paintstorm-icon.png" ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png
+        echo -e "${GREEN}✓ Icon installed from $(pwd)/paintstorm-icon.png${NC}"
+        ICON_INSTALLED=true
     elif [ -f "$HOME/paintstorm-icon.png" ]; then
         cp "$HOME/paintstorm-icon.png" ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png
         echo -e "${GREEN}✓ Icon installed from ~/paintstorm-icon.png${NC}"
+        ICON_INSTALLED=true
     else
-        echo -e "${YELLOW}⚠ paintstorm-icon.png not found in current directory${NC}"
-        echo "  Place paintstorm-icon.png here and run: cp paintstorm-icon.png ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png"
+        echo -e "${YELLOW}⚠ paintstorm-icon.png not found${NC}"
+        echo "  Expected location: $SCRIPT_DIR/paintstorm-icon.png"
     fi
 
     # Update databases
@@ -354,17 +375,57 @@ EOF
         echo "  ✓ NVIDIA GPU support"
     fi
     echo ""
-    echo -e "${BLUE}Debugging Tablet Support:${NC}"
+    echo -e "${BLUE}=========================================="
+    echo "Files Added to Host System"
+    echo "==========================================${NC}"
+    echo ""
+    echo -e "${GREEN}Launcher Script:${NC}"
+    echo "  $WRAPPER_SCRIPT"
+    echo ""
+    echo -e "${GREEN}Desktop Entry:${NC}"
+    echo "  ~/.local/share/applications/paintstorm.desktop"
+    echo ""
+    if [ "$ICON_INSTALLED" = true ]; then
+        echo -e "${GREEN}Icon:${NC}"
+        echo "  ~/.local/share/icons/hicolor/256x256/apps/paintstorm.png"
+        echo ""
+    fi
+    echo -e "${GREEN}Management Script:${NC}"
+    echo "  ~/paintstorm-manage.sh"
+    echo ""
+    echo -e "${BLUE}=========================================="
+    echo "Basic Distrobox Commands"
+    echo "==========================================${NC}"
+    echo ""
+    echo -e "${GREEN}Enter container:${NC}"
+    echo "  distrobox enter $CONTAINER_NAME"
+    echo ""
+    echo -e "${GREEN}Stop container:${NC}"
+    echo "  distrobox stop $CONTAINER_NAME"
+    echo ""
+    echo -e "${GREEN}Remove container:${NC}"
+    echo "  distrobox rm $CONTAINER_NAME"
+    echo ""
+    echo -e "${GREEN}List all containers:${NC}"
+    echo "  distrobox list"
+    echo ""
+    echo -e "${GREEN}Container info:${NC}"
+    echo "  podman ps -a | grep $CONTAINER_NAME"
+    echo ""
+    echo -e "${BLUE}=========================================="
+    echo "Debugging Tablet Support"
+    echo "==========================================${NC}"
+    echo ""
+    echo -e "${GREEN}Recommended:${NC} Use native HID support (no OpenTabletDriver needed)"
+    echo ""
     echo "  1. Run diagnostic: ./test-tablet-pressure.sh"
     echo "  2. Check input devices: ls -la /dev/input/by-id/"
     echo "  3. Check hidraw devices: ls -la /dev/hidraw*"
     echo "  4. Test xinput: xinput list"
     echo "  5. Run with debug: WACOMDEBUG=1 $WRAPPER_SCRIPT"
     echo ""
-    echo -e "${YELLOW}Important for Pressure/Tilt:${NC}"
-    echo "  • Make sure OpenTabletDriver is running: otd-daemon"
-    echo "  • Hidraw devices must be present on host AND in container"
-    echo "  • Run './test-tablet-pressure.sh' to diagnose issues"
+    echo -e "${YELLOW}Note:${NC} OpenTabletDriver (OTD) is NOT recommended with Paintstorm"
+    echo "      Native HID support works perfectly for pressure and tilt"
     echo ""
 
 else