diff options
author | Simon Rettberg | 2019-05-13 16:13:31 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-05-13 16:13:31 +0200 |
commit | ddb79d2950cb9dc0a41797807bf5133dd8f4da12 (patch) | |
tree | 2e45e8165c4099e295a5d317fea9e6c3b6656ef0 /core/modules/xscreensaver | |
parent | [kiosk-chromium] disable autofill for kiosks (diff) | |
download | mltk-ddb79d2950cb9dc0a41797807bf5133dd8f4da12.tar.gz mltk-ddb79d2950cb9dc0a41797807bf5133dd8f4da12.tar.xz mltk-ddb79d2950cb9dc0a41797807bf5133dd8f4da12.zip |
[xscreensaver/idleaction] Use idle-daemon
Diffstat (limited to 'core/modules/xscreensaver')
-rwxr-xr-x | core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver b/core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver index 2b4fbef5..1220dad3 100755 --- a/core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver +++ b/core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver @@ -1,8 +1,8 @@ #!/bin/ash -DPMS=False -AUTOLOCK=True if which xscreensaver; then + DPMS=False + AUTOLOCK=True secsToTime() { local NUM SECS MINS HRS NUM="$1" @@ -14,9 +14,8 @@ if which xscreensaver; then [ -z "$UID" ] && UID=$(id -u) [ -z "$HOME" ] && HOME="$(getent passwd "$UID" | head -n 1 | awk -F ':' '{print $6}')" . /opt/openslx/config - SBY=${SLX_SCREEN_STANDBY_TIMEOUT} + SBY="${SLX_SCREEN_STANDBY_TIMEOUT}" if [ -n "${SLX_EXAM}" ]; then - SLX_LOGOUT_TIMEOUT=0 SLX_SCREEN_SAVER_TIMEOUT=0 SLX_SCREEN_SAVER_GRACE_TIME= AUTOLOCK=False @@ -28,23 +27,16 @@ if which xscreensaver; then elif ! [ "$SBY" -ge 0 ]; then # isNumeric? SBY=0 fi - # Make sure standby timeout is less than logout timeout, otherwise, disable standby + # Create config value for standby timeout if [ "$SBY" -gt 0 ]; then - if [ "$SLX_LOGOUT_TIMEOUT" -gt 0 ]; then - if [ "$SBY" -lt 300 ]; then - SBY=300 - fi - if [ "$SLX_LOGOUT_TIMEOUT" -lt "$SBY" ]; then - SBY=0 - fi - fi + DPMS=True + STANDBY="$( secsToTime "$(( SBY + 60 ))" )" + else + STANDBY="99:00:00" fi - # Create config value for standby timeout - [ "$SBY" -gt 0 ] && DPMS=True - STANDBY="$( secsToTime "$SBY" )" # Explicit screen saver timeout set if [ "$SLX_SCREEN_SAVER_TIMEOUT" -gt 0 ]; then - TIMEOUT="$( secsToTime "$SLX_SCREEN_SAVER_TIMEOUT" )" + TIMEOUT="$( secsToTime "$(( SLX_SCREEN_SAVER_TIMEOUT + 30 ))" )" else TIMEOUT="99:00:00" fi |