summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcore/modules/idleaction/data/etc/X11/Xsession.d/95-xscreensaver2
-rwxr-xr-xcore/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session2
-rwxr-xr-xcore/modules/xscreensaver/data/opt/openslx/pvs2/lockDesktop.sh23
3 files changed, 20 insertions, 7 deletions
diff --git a/core/modules/idleaction/data/etc/X11/Xsession.d/95-xscreensaver b/core/modules/idleaction/data/etc/X11/Xsession.d/95-xscreensaver
index 441d9243..86a9995a 100755
--- a/core/modules/idleaction/data/etc/X11/Xsession.d/95-xscreensaver
+++ b/core/modules/idleaction/data/etc/X11/Xsession.d/95-xscreensaver
@@ -34,6 +34,8 @@ if command -v xscreensaver; then
elif ! [ "$SBY" -ge 0 ]; then # isNumeric?
SBY=0
fi
+ # Guest session/auto login, don't lock
+ [ "$GUEST_SESSION" = "True" ] && NEVER_LOCK=True
# If web based login, we can't authenticate again as we don't have the password - never lock
if [ -z "$NEVER_LOCK" ]; then
usrname="$( < "/etc/passwd" awk -v "uid=$UID" -F ':' '$3 == uid {print $5; exit}' )"
diff --git a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session
index eb3205aa..3ca52dba 100755
--- a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session
+++ b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session
@@ -2,6 +2,8 @@
. /opt/openslx/config
+export GUEST_SESSION=True
+
GUESTDIR="/opt/openslx/lightdm/autologin.d"
if [ -d "$GUESTDIR" ]; then
for file in $GUESTDIR/*; do
diff --git a/core/modules/xscreensaver/data/opt/openslx/pvs2/lockDesktop.sh b/core/modules/xscreensaver/data/opt/openslx/pvs2/lockDesktop.sh
index 8b759e3c..1443f8fd 100755
--- a/core/modules/xscreensaver/data/opt/openslx/pvs2/lockDesktop.sh
+++ b/core/modules/xscreensaver/data/opt/openslx/pvs2/lockDesktop.sh
@@ -1,18 +1,27 @@
#!/bin/ash
-[ -z "$UID" ] && UID="$( id -u )"
+# Cannot lock guest session, as the user probably doesn't know
+# demo's password
+if [ "$GUEST_SESSION" = "True" ]; then
+ xmessage "Gastsitzungen koennen nicht gesperrt werden."
+ exit 0
+fi
+# Browser-based login sessions cannot be unlocked for technical reasons,
+# so disallow locking
+[ -z "$UID" ] && UID="$( id -u )"
usrname="$( < "/etc/passwd" awk -v "uid=$UID" -F ':' '$3 == uid {print $5; exit}' )"
# Yes, this really checks if $usrname ends in @browser, and sets NEVER_LOCK to true if so
if [ "${usrname%"@browser"}" != "${usrname}" ]; then
xmessage "Web-Basierte Logins koennen die Sitzung leider nicht sperren."
exit 0
-else
- . /opt/openslx/config
- if [ -n "$SLX_EXAM" ]; then
- xmessage "Im Klausurmodus nicht moeglich"
- exit 0
- fi
+fi
+
+# Don't allow locking in exam mode
+. /opt/openslx/config
+if [ -n "$SLX_EXAM" ]; then
+ xmessage "Im Klausurmodus nicht moeglich"
+ exit 0
fi
# Any mouse-ungrab logic is embedded in our modded xscreensaver now,