From e9cb256529533181d64b625255d1385f63497a6c Mon Sep 17 00:00:00 2001 From: ske087 Date: Fri, 22 Aug 2025 07:16:20 +0100 Subject: [PATCH] Add minimal Xorg/Openbox installer for headless systems --- install_minimal_xorg.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 install_minimal_xorg.sh diff --git a/install_minimal_xorg.sh b/install_minimal_xorg.sh new file mode 100644 index 0000000..5fdcca5 --- /dev/null +++ b/install_minimal_xorg.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Minimal installer for Raspberry Pi OS (no desktop environment) +# Installs Xorg, Openbox, disables power saving, and configures auto-launch of the signage player + +set -e + +USER_HOME="/home/pi" +PROJECT_DIR="$USER_HOME/Desktop/signage-player" +APP_LAUNCH_SCRIPT="$PROJECT_DIR/run_tkinter_app.sh" + +# Update system +sudo apt update +sudo apt upgrade -y + +# Install minimal X server and Openbox +sudo apt install -y xorg openbox + +# Install VLC for video playback +sudo apt install -y vlc + +# Install Python and dependencies +sudo apt install -y python3 python3-pip python3-venv python3-tk ffmpeg libopencv-dev python3-opencv \ + libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev \ + libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev + +# Create virtual environment and install Python requirements +cd "$PROJECT_DIR" +python3 -m venv venv +source venv/bin/activate +pip install --upgrade pip +pip install -r tkinter_requirements.txt +pip install python-vlc +chmod +x "$APP_LAUNCH_SCRIPT" +deactivate