updated with some helpful info
authorFred T. Hamster <fred@gruntose.com>
Mon, 1 Dec 2025 14:55:24 +0000 (09:55 -0500)
committerFred T. Hamster <fred@gruntose.com>
Mon, 1 Dec 2025 14:55:24 +0000 (09:55 -0500)
scripts/core/start_xwin_screensaver.sh

index d2257daca2a04c8863cb2e025f7f4fe51b9f3e69..59440b9bab505cb41c1816fd75a182453d5f1d1a 100644 (file)
@@ -87,6 +87,9 @@ xss_running="$(psa xss-lock)"
 xss_running=${xss_running//$'\n'/}
 xss_running=${xss_running//$'\r'/}
 
+# sentinel to track whether we're already running or not.
+skip_startup=
+
 if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
   echo -e "check for running xss-lock came up with: '$xss_running'"
 fi
@@ -94,19 +97,21 @@ if [ ! -z "$xss_running" ]; then
   if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
     echo "The xss-lock application is already running, so a screensaver is already hooked in."
   fi
-  exit 0
+  skip_startup=true
 fi
 
-# set the time-out for inactivity.
-xset s 300 5
-exit_on_error "setting the x window inactivity timeout"
-
-# run the xss-lock program to handle x-window locking.
-start_background_action \
-  "xss-lock -n "$DIMMER" -l -- xsecurelock"
-continue_on_error "starting up xsecurelock as the screensaver"
+# only register the screensaver and crank it up if not running already.
+if [ -z "$skip_startup" ]; then
+  # set the time-out for inactivity.
+  xset s 300 5
+  exit_on_error "setting the x window inactivity timeout"
 
-if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
-  echo xsecurelock has been started.
+  # run the xss-lock program to handle x-window locking.
+  start_background_action \
+    "xss-lock -n "$DIMMER" -l -- xsecurelock"
+  continue_on_error "starting up xsecurelock as the screensaver"
 fi
 
+echo "xsecurelock has been started.  to test locking the screen, type:"
+echo "   xset s activate"
+