- Enhanced install_minimal_xorg.sh with full automatic startup configuration - Added systemd service for robust signage player auto-start - Configured autologin and X server auto-launch on boot - Added multiple startup methods (systemd, bashrc, rc.local) for reliability - Disabled screen blanking and power management for kiosk operation - Updated requirements.txt with proper version specifications - Fixed run_tkinter_debug.sh for correct directory structure - Added comprehensive logging and error handling - Optimized for headless Raspberry Pi Zero deployment Features: ✅ Plug-and-play operation - boots directly to signage player ✅ Automatic restart on crashes ✅ Multiple fallback startup methods ✅ Complete dependency installation ✅ Service management commands ✅ Hardware optimizations for digital signage
40 lines
1019 B
Bash
Executable File
40 lines
1019 B
Bash
Executable File
#!/bin/bash
|
|
# Debugging launch script for the tkinter player application
|
|
|
|
# Set working directory to script location
|
|
cd "$(dirname "$0")"
|
|
|
|
# Activate the virtual environment if it exists
|
|
if [ -d "venv" ]; then
|
|
source venv/bin/activate
|
|
echo "Virtual environment activated"
|
|
else
|
|
echo "Warning: No virtual environment found, using system Python"
|
|
fi
|
|
|
|
# Set environment variables for better display on Raspberry Pi
|
|
export DISPLAY=${DISPLAY:-:0.0}
|
|
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/runtime-pi}
|
|
|
|
# Change to the signage_player directory
|
|
cd signage_player
|
|
|
|
# Run the main application with full error output
|
|
echo "Starting tkinter player..."
|
|
echo "Working directory: $(pwd)"
|
|
echo "Python path: $(which python3)"
|
|
echo "Display: $DISPLAY"
|
|
|
|
# Run with error logging
|
|
python3 main.py 2>&1 | tee ../main_data/app_debug.log
|
|
|
|
# Capture exit code
|
|
EXIT_CODE=$?
|
|
|
|
# Deactivate virtual environment when done
|
|
if [ -d "../venv" ]; then
|
|
deactivate
|
|
fi
|
|
|
|
echo "Application exited with code: $EXIT_CODE"
|
|
exit $EXIT_CODE |