summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-05-03 11:16:37 +0200
committerSimon Rettberg2023-05-03 11:16:37 +0200
commit14ef110e8f560be95b618025341149ddf016d925 (patch)
treeb3aae89bf278dd014f789dfa170c48d2b0f55149
parent[looking-glass-client] Update to B6 (diff)
downloadmltk-14ef110e8f560be95b618025341149ddf016d925.tar.gz
mltk-14ef110e8f560be95b618025341149ddf016d925.tar.xz
mltk-14ef110e8f560be95b618025341149ddf016d925.zip
[lightdm-greeter-bwlp/xorg] Fix: lightdm restarts on failed auth
-rw-r--r--core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf3
-rwxr-xr-xcore/modules/xorg/data/etc/X11/Xreset5
-rwxr-xr-xcore/modules/xorg/data/etc/X11/Xsession-setup5
-rwxr-xr-xcore/modules/xorg/data/etc/X11/Xsetup5
4 files changed, 16 insertions, 2 deletions
diff --git a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf
index b58e55c0..e166b256 100644
--- a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf
+++ b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf
@@ -1,4 +1,4 @@
-[SeatDefaults]
+[Seat:*]
greeter-hide-users=true
greeter-session=qt-lightdm-greeter
greeter-wrapper=/opt/openslx/lightdm/greeter-wrapper
@@ -8,6 +8,7 @@ guest-wrapper=/opt/openslx/lightdm/guest-session
session-wrapper=/etc/X11/Xsession
display-setup-script=/etc/X11/Xsetup
+session-setup-script=/etc/X11/Xsession-setup
session-cleanup-script=/etc/X11/Xreset
[LightDM]
diff --git a/core/modules/xorg/data/etc/X11/Xreset b/core/modules/xorg/data/etc/X11/Xreset
index a0f436cd..23048ab9 100755
--- a/core/modules/xorg/data/etc/X11/Xreset
+++ b/core/modules/xorg/data/etc/X11/Xreset
@@ -5,6 +5,11 @@
# Xreset - run as root after session exits
#
+# Only run this if a session was actually started, as lightdm also calls
+# this script on every failed login attempt
+[ -e "/run/openslx/ldm-session-$DISPLAY" ] || exit 0
+rm -f -- "/run/openslx/ldm-session-$DISPLAY"
+
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin"
PROGNAME=Xreset
diff --git a/core/modules/xorg/data/etc/X11/Xsession-setup b/core/modules/xorg/data/etc/X11/Xsession-setup
new file mode 100755
index 00000000..753e56da
--- /dev/null
+++ b/core/modules/xorg/data/etc/X11/Xsession-setup
@@ -0,0 +1,5 @@
+#!/bin/ash
+
+# Marker that a session started (Xreset)
+touch "/run/openslx/ldm-session-$DISPLAY"
+exit 0
diff --git a/core/modules/xorg/data/etc/X11/Xsetup b/core/modules/xorg/data/etc/X11/Xsetup
index b93d7bd6..d9e33617 100755
--- a/core/modules/xorg/data/etc/X11/Xsetup
+++ b/core/modules/xorg/data/etc/X11/Xsetup
@@ -3,10 +3,13 @@
# /etc/X11/Xsetup
#
# Xsetup is executed once before the greeter starts (as root)
-#
+#
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin"
+# Marker that a session actually started (Xreset)
+rm -f -- "/run/openslx/ldm-session-$DISPLAY"
+
SESSIONDIR="/etc/X11/Xsetup.d"
if [ -d "$SESSIONDIR" ]; then