Lock screen doesn't work

Oh BTW, here is my workaround for the crashing screensaver:

EDIT: added 3 lines to the code, removed debug parameter

#!/bin/bash
     
# to be the only instance, kill all the others, but not yourself
kill -SIGKILL $( pgrep "${0##*/}" |grep -v "$$" )

# kill the running version of screensaver
killall -SIGKILL mate-screensave
sleep 1

# logfile, name it whatever you like
logfile="$HOME/screencrash.log"

while :
do
	mate-screensaver --no-daemon  &>>"$logfile"
	date +'screensaver died at %Y-%m-%d  %H:%M' >>"$logfile"
	sleep 5
done

Name this script "screensaverfix" or something like that
make it executable after you saved it

In the control-center open startup-applications,
disable the regular screensaver startup entry,
make a new startup entry and
put something like this in the command section:
nohup /path/to/screensaverfix

1 Like