Fix: Run screen script with sudo to ensure access to video device

This commit is contained in:
PaulVua
2026-02-17 12:43:28 +01:00
parent d086a440dd
commit e659696044

View File

@@ -1756,7 +1756,7 @@ if ($type == "screen_control") {
$action = $_GET['action']; $action = $_GET['action'];
if ($action == "start") { if ($action == "start") {
// Run as background process // Run as background process
$command = 'export DISPLAY=:0 && nohup /usr/bin/python3 /var/www/nebuleair_pro_4g/screen_control/screen.py > /dev/null 2>&1 &'; $command = 'nohup sudo /usr/bin/python3 /var/www/nebuleair_pro_4g/screen_control/screen.py > /dev/null 2>&1 &';
shell_exec($command); shell_exec($command);
echo "Started"; echo "Started";
} elseif ($action == "stop") { } elseif ($action == "stop") {