diff --git a/.run-background.sh b/.run-background.sh index a910bac..bf42df9 100755 --- a/.run-background.sh +++ b/.run-background.sh @@ -1,11 +1,11 @@ #\!/bin/bash -SCRIPT_DIR="/home/pi/kiwy-signage" -LOG_FILE="/home/pi/kiwy-signage/logs/player-background.log" +SCRIPT_DIR="/home/pi/Desktop/Kiwy-Signage" +LOG_FILE="/home/pi/Desktop/Kiwy-Signage/logs/player-background.log" mkdir -p "." -echo "[2026-07-17 10:54:53] Starting player in background..." >> "" -cd "/home/pi/kiwy-signage" || exit 1 +echo "[2026-10-02 15:28:02] Starting player in background..." >> "" +cd "/home/pi/Desktop/Kiwy-Signage" || exit 1 nohup bash start.sh >> "" 2>&1 & PLAYER_PID=$\! -echo "[2026-07-17 10:54:53] Player started with PID: $PLAYER_PID" >> "" +echo "[2026-10-02 15:28:02] Player started with PID: $PLAYER_PID" >> "" echo "Player started in background (PID: $PLAYER_PID)" echo "Logs: $LOG_FILE" diff --git a/.start-player-cron.sh b/.start-player-cron.sh index 0fa7745..acf5180 100755 --- a/.start-player-cron.sh +++ b/.start-player-cron.sh @@ -1,3 +1,3 @@ #\!/bin/bash sleep 15 -cd /home/pi/kiwy-signage && bash start.sh +cd /home/pi/Desktop/Kiwy-Signage && bash start.sh diff --git a/config/app_config.json b/config/app_config.json index 9addf0d..5221123 100644 --- a/config/app_config.json +++ b/config/app_config.json @@ -1,17 +1,15 @@ { - "server_ip": "", - "port": "8080", - "screen_name": "", - "quickconnect_key": "", + "server_ip": "192.168.0.110", + "port": "", + "screen_name": "rpi-tvholba1", + "quickconnect_key": "8887779", "orientation": "Landscape", "touch": "True", "max_resolution": "1920x1080", "edit_feature_enabled": true, "use_https": false, "verify_ssl": false, - "card_reader_mode": "auto", - "card_reader_device": "", - "card_reader_timeout": 5, + "production_mode": false, "weblink": { "engine": "auto", "interaction_postpone": 10, @@ -21,5 +19,8 @@ "min_max_dwell": 300, "launch_timeout": 15, "prewarm": false - } + }, + "card_reader_mode": "auto", + "card_reader_device": "", + "card_reader_timeout": 5 } \ No newline at end of file diff --git a/install.sh b/install.sh index 8367d01..2b36c72 100755 --- a/install.sh +++ b/install.sh @@ -386,6 +386,13 @@ echo "" if detect_raspberry_pi; then echo "Step 5/6: Optimizing for Raspberry Pi..." echo "--------------------" + + if [ -f "$SCRIPT_DIR/linux/fix_kivy_sdl2.sh" ]; then + echo "Applying Raspberry Pi Wayland SDL2 fix..." + bash "$SCRIPT_DIR/linux/fix_kivy_sdl2.sh" + else + echo "WARNING: linux/fix_kivy_sdl2.sh not found; Wayland SDL2 fix skipped" + fi BOOT_CONFIG=$(find_boot_config) if [ -n "$BOOT_CONFIG" ]; then @@ -433,6 +440,15 @@ mkdir -p "$SCRIPT_DIR/logs" touch "$SCRIPT_DIR/logs/.gitkeep" 2>/dev/null || true echo "Player directories created" +# The installer may have been run with sudo, leaving downloaded media and +# playlist files owned by root. The desktop player runs as ACTUAL_USER. +ACTUAL_GROUP=$(id -gn "$ACTUAL_USER") +echo "Granting $ACTUAL_USER write access to player media and playlists..." +run_sudo chown -R "$ACTUAL_USER:$ACTUAL_GROUP" \ + "$SCRIPT_DIR/media" "$SCRIPT_DIR/playlists" +run_sudo chmod -R u+rwX "$SCRIPT_DIR/media" "$SCRIPT_DIR/playlists" +echo "Media and playlist permissions configured" + # Write player configuration write_player_config() { local config_dir="$SCRIPT_DIR/config"