summaryrefslogtreecommitdiffstats
path: root/core/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch')
-rwxr-xr-xcore/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch b/core/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch
new file mode 100755
index 00000000..43af3640
--- /dev/null
+++ b/core/modules/kiosk-common/data/opt/openslx/scripts/kiosk-launch
@@ -0,0 +1,26 @@
+#!/bin/bash
+# generic kiosk mode launcher
+
+. /opt/openslx/config
+
+[ -z "$SLX_BROWSER_URL" ] && exit 1
+
+# disable power management features
+xset s off
+xset -dpms
+
+# start openbox window manager
+openbox --config-file "/etc/xdg/openbox/rc.xml.kiosk" &
+
+# move the mouse away
+xdotool mousemove 20000 20000 &
+
+# run browser
+for file in "$0".d/*; do
+ . "$file" || slxlog "kiosk-launch" "Failed to source '$file'."
+done
+
+# should not come to this point as above sources should
+# exec away
+slxlog "kiosk-launch" "No kiosk browser configured!"
+exit 1