Initial import: clean snapshot from /home/olafn/infoscreen-dev (2025-10-25)
This commit is contained in:
43
scripts/start-display-manager.sh
Executable file
43
scripts/start-display-manager.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# Start Display Manager - Controls display software for infoscreen events
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
VENV_PATH="$PROJECT_ROOT/venv"
|
||||
DISPLAY_MANAGER="$PROJECT_ROOT/src/display_manager.py"
|
||||
|
||||
echo "🖥️ Starting Display Manager..."
|
||||
echo "Project root: $PROJECT_ROOT"
|
||||
|
||||
# Check if virtual environment exists
|
||||
if [ ! -d "$VENV_PATH" ]; then
|
||||
echo "❌ Virtual environment not found at: $VENV_PATH"
|
||||
echo "Please create it with: python3 -m venv venv"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Activate virtual environment
|
||||
source "$VENV_PATH/bin/activate"
|
||||
|
||||
# Check if display_manager.py exists
|
||||
if [ ! -f "$DISPLAY_MANAGER" ]; then
|
||||
echo "❌ Display manager not found at: $DISPLAY_MANAGER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure DISPLAY is set (required for GUI applications)
|
||||
if [ -z "$DISPLAY" ]; then
|
||||
export DISPLAY=:0
|
||||
echo "📺 DISPLAY not set, using: $DISPLAY"
|
||||
fi
|
||||
|
||||
# Check if we're in development or production
|
||||
ENV="${ENV:-development}"
|
||||
echo "Environment: $ENV"
|
||||
|
||||
# Start display manager
|
||||
echo "Starting display manager..."
|
||||
echo "---"
|
||||
python3 "$DISPLAY_MANAGER"
|
||||
Reference in New Issue
Block a user