Complete auto-startup installation system for Raspberry Pi Zero
- 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
This commit is contained in:
@@ -1,14 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Debugging launch script for the tkinter player application
|
||||
|
||||
# Activate the virtual environment
|
||||
source venv/bin/activate
|
||||
# Set working directory to script location
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Change to the tkinter app src directory
|
||||
cd signage_player/src
|
||||
# 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
|
||||
python main.py
|
||||
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
|
||||
deactivate
|
||||
if [ -d "../venv" ]; then
|
||||
deactivate
|
||||
fi
|
||||
|
||||
echo "Application exited with code: $EXIT_CODE"
|
||||
exit $EXIT_CODE
|
||||
Reference in New Issue
Block a user