summaryrefslogtreecommitdiffstats
path: root/core/modules/xscreensaver
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-14 15:48:44 +0200
committerSimon Rettberg2019-05-14 15:48:44 +0200
commitd8acc57f354a93929573393850c61e01c2f8d103 (patch)
treebe40e0be4037a5993cf95a46ab4145b44b138b10 /core/modules/xscreensaver
parent[idleaction] Refine exam mode shutdown/reboot timing (diff)
downloadmltk-d8acc57f354a93929573393850c61e01c2f8d103.tar.gz
mltk-d8acc57f354a93929573393850c61e01c2f8d103.tar.xz
mltk-d8acc57f354a93929573393850c61e01c2f8d103.zip
[xscreensaver/idleaction] DPMS handled by idle-daemon
Diffstat (limited to 'core/modules/xscreensaver')
-rwxr-xr-xcore/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver73
-rw-r--r--core/modules/xscreensaver/module.build4
2 files changed, 3 insertions, 74 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
deleted file mode 100755
index 1220dad3..00000000
--- a/core/modules/xscreensaver/data/etc/X11/Xsession.d/95-xscreensaver
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/ash
-
-if which xscreensaver; then
- DPMS=False
- AUTOLOCK=True
- secsToTime() {
- local NUM SECS MINS HRS
- NUM="$1"
- SECS=0$(( NUM % 60 ))
- MINS=0$(( ( NUM / 60 ) % 60 ))
- HRS=0$(( ( NUM / 3600 ) % 60 ))
- echo "${HRS:$(( ${#HRS} - 2 )):2}:${MINS:$(( ${#MINS} - 2 )):2}:${SECS:$(( ${#SECS} - 2 )):2}"
- }
- [ -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}"
- if [ -n "${SLX_EXAM}" ]; then
- SLX_SCREEN_SAVER_TIMEOUT=0
- SLX_SCREEN_SAVER_GRACE_TIME=
- AUTOLOCK=False
- SBY=0
- elif [ -z "$SBY" ]; then
- SBY=0
- elif [ "$SBY" -gt 0 ] && [ "$SBY" -lt 60 ]; then
- SBY=60
- elif ! [ "$SBY" -ge 0 ]; then # isNumeric?
- SBY=0
- fi
- # Create config value for standby timeout
- if [ "$SBY" -gt 0 ]; then
- DPMS=True
- STANDBY="$( secsToTime "$(( SBY + 60 ))" )"
- else
- STANDBY="99:00:00"
- fi
- # Explicit screen saver timeout set
- if [ "$SLX_SCREEN_SAVER_TIMEOUT" -gt 0 ]; then
- TIMEOUT="$( secsToTime "$(( SLX_SCREEN_SAVER_TIMEOUT + 30 ))" )"
- else
- TIMEOUT="99:00:00"
- fi
- if [ -z "$SLX_SCREEN_SAVER_GRACE_TIME" ]; then
- GRACE="99:00:00"
- AUTOLOCK=False
- else
- GRACE="$( secsToTime "$SLX_SCREEN_SAVER_GRACE_TIME" )"
- fi
- if ! [ -s "$HOME/.xscreensaver" ]; then
- cat > "$HOME/.xscreensaver" <<EOF
-mode: one
-cycle: 99:00:00
-timeout: $TIMEOUT
-lock: $AUTOLOCK
-lockTimeout: $GRACE
-fade: False
-unfade: False
-dpmsEnabled: $DPMS
-dpmsStandby: $STANDBY
-dpmsSuspend: $STANDBY
-dpmsOff: $STANDBY
-dpmsFullThrottle: True
-newLoginCommand:
-externalUngrabCommand: /opt/openslx/xscreensaver/ungrab
-programs: /opt/openslx/bin/bwlp-screensaver
-selected: 0
-EOF
- fi
- xscreensaver -no-splash &
-fi
-
-true
-
diff --git a/core/modules/xscreensaver/module.build b/core/modules/xscreensaver/module.build
index 676def43..e7e60e26 100644
--- a/core/modules/xscreensaver/module.build
+++ b/core/modules/xscreensaver/module.build
@@ -10,8 +10,10 @@ build() {
mkdir -p "${MODULE_BUILD_DIR}/usr/bin"
cde "$SRCDIR/xscreensaver"
pinfo "Building xscreensaver"
+ # Disable DPMS handling since we're using idle-daemon
+ # which accounts for our beautiful vmware ungrab crap
./configure --enable-locking --disable-root-passwd \
- --with-dpms-ext --with-xinput-ext --with-xf86vmode-ext \
+ --without-dpms-ext --with-xinput-ext --with-xf86vmode-ext \
--with-randr-ext --with-pam --with-login-manager \
--prefix=/usr --without-proc-interrupts $REQUIRED_CONFIGURE_OPTIONS \
|| perror "'./configure' failed"