added a guard to catch an unusual error
authorChris Koeritz <fred@gruntose.com>
Wed, 3 Dec 2025 16:25:20 +0000 (11:25 -0500)
committerChris Koeritz <fred@gruntose.com>
Wed, 3 Dec 2025 16:25:20 +0000 (11:25 -0500)
ran this recently and seemed to think things were installed, but then xsecurelock wasn't really there.
this at least catches this situation; still need to fix deeper cause of problem.

scripts/system/start_xwin_screensaver.sh

index 4fbfb5c96f1bd3be47e8ca29ebf7d3b0aaa5aa9c..449b673bc772a16bd08dc44a4901a3f198ca3c06 100644 (file)
@@ -55,6 +55,13 @@ killall -9 xscreensaver &>/dev/null
 
 # fix the xsecurelock file for the xscreensaver; paths haven't been updated to latest.
 XSECURELOCK_XSCREENSAVER='/usr/libexec/xsecurelock/saver_xscreensaver'
+if [ ! -f "$XSECURELOCK_XSCREENSAVER" ]; then
+  echo "
+An error occurred and the xsecurelock tool was not installed properly.
+This file is missing: $XSECURELOCK_XSCREENSAVER
+Abandoning screensaver setup."
+  exit 1
+fi
 grep -q '/usr/lib/xscreensaver' $XSECURELOCK_XSCREENSAVER
 #hmmm: also, check that we're using the right path for xscreensaver!  what if old system, where in old place?
 if [ $? -eq 0 ]; then