summaryrefslogtreecommitdiffstats
path: root/core/modules/slxbrowser
diff options
context:
space:
mode:
authorSimon Rettberg2017-07-12 18:35:23 +0200
committerroot2017-07-12 18:35:23 +0200
commite5648893b5a71955c3adaefe6765cd897d6511fb (patch)
treed19926d261ed26a3b29e6e8695b34ae0df423d7b /core/modules/slxbrowser
parent[*] systemd fixes cont. (diff)
downloadmltk-e5648893b5a71955c3adaefe6765cd897d6511fb.tar.gz
mltk-e5648893b5a71955c3adaefe6765cd897d6511fb.tar.xz
mltk-e5648893b5a71955c3adaefe6765cd897d6511fb.zip
[slxbrowser] Add kiosk mode scripts/service/target
Diffstat (limited to 'core/modules/slxbrowser')
-rw-r--r--core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target3
l---------core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/graphical.target1
l---------core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/kiosk.service1
-rw-r--r--core/modules/slxbrowser/data/etc/systemd/system/kiosk.service8
-rwxr-xr-xcore/modules/slxbrowser/data/opt/openslx/scripts/kiosk-launch13
-rwxr-xr-xcore/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk16
6 files changed, 42 insertions, 0 deletions
diff --git a/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target
new file mode 100644
index 00000000..fb95249c
--- /dev/null
+++ b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target
@@ -0,0 +1,3 @@
+[Unit]
+Description=Kiosk mode
+
diff --git a/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/graphical.target b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/graphical.target
new file mode 120000
index 00000000..949b0756
--- /dev/null
+++ b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/graphical.target
@@ -0,0 +1 @@
+../graphical.target \ No newline at end of file
diff --git a/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/kiosk.service b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/kiosk.service
new file mode 120000
index 00000000..a6e3a110
--- /dev/null
+++ b/core/modules/slxbrowser/data/etc/systemd/system/kiosk-mode.target.wants/kiosk.service
@@ -0,0 +1 @@
+../kiosk.service \ No newline at end of file
diff --git a/core/modules/slxbrowser/data/etc/systemd/system/kiosk.service b/core/modules/slxbrowser/data/etc/systemd/system/kiosk.service
new file mode 100644
index 00000000..dba49864
--- /dev/null
+++ b/core/modules/slxbrowser/data/etc/systemd/system/kiosk.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Prepare KIOSK mode
+Before=display-manager.service kdm.service lightdm.service
+
+[Service]
+ExecStart=/opt/openslx/scripts/systemd-setup_kiosk
+RemainAfterExit=true
+
diff --git a/core/modules/slxbrowser/data/opt/openslx/scripts/kiosk-launch b/core/modules/slxbrowser/data/opt/openslx/scripts/kiosk-launch
new file mode 100755
index 00000000..ed8a205f
--- /dev/null
+++ b/core/modules/slxbrowser/data/opt/openslx/scripts/kiosk-launch
@@ -0,0 +1,13 @@
+#!/bin/ash
+
+. /opt/openslx/config
+
+[ -z "$SLX_BROWSER_URL" ] && exit 1
+
+xset s off
+xset -dpms
+
+openbox &
+
+exec slxbrowser --insecure --fullscreen "$SLX_BROWSER_URL"
+
diff --git a/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk b/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk
new file mode 100755
index 00000000..6635bc19
--- /dev/null
+++ b/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk
@@ -0,0 +1,16 @@
+#!/bin/ash
+
+# Autologin
+sed -i '/^AutoLoginDelay=/d;/^AutoLoginUser=/d;s/^AutoLoginEnable=.*$/AutoLoginEnable=true\nAutoLoginUser=demo\nAutoLoginDelay=0/' "/etc/kde4/kdm/kdmrc"
+
+# desktop session
+cat > /opt/openslx/xsessions/default.desktop <<EOF
+[Desktop Entry]
+Name=SLXbrowser
+Comment=Minimalistic browser
+Exec=/opt/openslx/scripts/kiosk-launch
+Type=Application
+X-LightDM-DesktopName=SLXbrowser
+DesktopNames=SLXbrowser
+EOF
+