diff options
author | Simon Rettberg | 2018-10-12 15:50:01 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-10-12 15:50:01 +0200 |
commit | 603712b955e3017e732e25ede4bf428a98778c80 (patch) | |
tree | 9c4ca10f29345590d3596ff96e79f9c90fab46fe | |
parent | [idleaction] Remember lock time and reset idletime if changed (diff) | |
download | mltk-603712b955e3017e732e25ede4bf428a98778c80.tar.gz mltk-603712b955e3017e732e25ede4bf428a98778c80.tar.xz mltk-603712b955e3017e732e25ede4bf428a98778c80.zip |
[idleaction/kiosk] Don't wait 5 minutes for demo to logout
-rwxr-xr-x | core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action | 6 | ||||
-rwxr-xr-x | core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action index 2717d6cb..df9fd65c 100755 --- a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action +++ b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action @@ -77,7 +77,11 @@ runaction () { sleep $(( DELAY * 60 )) fi for MINUTES in 5 X X X X X X X 3 X X X 2 X X X 1 X X X; do - NUM=$(who | wc -l) + if [ -f "/run/openslx/demo-no-logout-delay" ]; then + NUM=$(who | grep -v '^demo ' | wc -l) + else + NUM=$(who | wc -l) + fi [ "$NUM" = "0" ] && break if [ "$MINUTES" != "X" ]; then USERS=0 diff --git a/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk b/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk index 6635bc19..b8761aab 100755 --- a/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk +++ b/core/modules/slxbrowser/data/opt/openslx/scripts/systemd-setup_kiosk @@ -3,6 +3,10 @@ # Autologin sed -i '/^AutoLoginDelay=/d;/^AutoLoginUser=/d;s/^AutoLoginEnable=.*$/AutoLoginEnable=true\nAutoLoginUser=demo\nAutoLoginDelay=0/' "/etc/kde4/kdm/kdmrc" +# Disable logout delay for demo user on shutdown/reboot/... +mkdir -p "/run/openslx" +touch "/run/openslx/demo-no-logout-delay" + # desktop session cat > /opt/openslx/xsessions/default.desktop <<EOF [Desktop Entry] |