Files
tkinter_player/install_minimal_xorg.sh

35 lines
1.0 KiB
Bash

#!/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