From 14ef110e8f560be95b618025341149ddf016d925 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 3 May 2023 11:16:37 +0200 Subject: [lightdm-greeter-bwlp/xorg] Fix: lightdm restarts on failed auth --- core/modules/xorg/data/etc/X11/Xreset | 5 +++++ core/modules/xorg/data/etc/X11/Xsession-setup | 5 +++++ core/modules/xorg/data/etc/X11/Xsetup | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 core/modules/xorg/data/etc/X11/Xsession-setup (limited to 'core/modules/xorg') 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 -- cgit v1.2.3-55-g7522