summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
index 0c949044..8ae8a917 100644
--- a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
+++ b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
@@ -89,6 +89,8 @@ fi
if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; then
(
+ # Wake up to force refresh
+ idle-daemon --send 'get :0' &> /dev/null
wid=
while [ -z "$wid" ]; do
sleep 1
@@ -105,7 +107,8 @@ if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; th
fi
readonly wpid
activity=init
- last=
+ last="$(idle-daemon --send 'get :0' | grep -oP '(?<=idleSeconds=)[0-9]+')"
+ sleep 1
while true; do
if [ ! -d "/proc/$wpid" ]; then
echo "Process with PID $wpid stopped, exiting auto-reload loop."
@@ -122,6 +125,9 @@ if [ -n "$SLX_BROWSER_RELOAD_SECS" ] && [ "$SLX_BROWSER_RELOAD_SECS" -gt 0 ]; th
xdotool key Alt+Home
last="$current_idle"
sleep "$SLX_BROWSER_RELOAD_SECS"
+ # Wake up to force refresh
+ idle-daemon --send 'get :0' &> /dev/null
+ sleep 1
activity=init
continue
fi