With the latest MX23, XFCE screensaver is back in the Settings Manager, but without much choice of screensaver. But you can make xscreensaver themes run in it.
I use Synaptic package manager for this, doing a search for xscreensaver, and installing all the packages that begin with xscreensaver but not xscreensaver itself.
As root, create the following file as /usr/local/bin/xfce4-set-up-screensavers
Code: Select all
#!/bin/bash
##Declare locations
dirsource=/usr/share/xscreensaver/config
dirdest=/usr/share/applications/screensavers
direxec=/usr/libexec/xscreensaver
##go to screensaver config folder
cd $dirsource
##for each file, extract the screensaver's filename and public name
##and build a desktop file
##Remember that a single > begins a new file, possibly erasing an
##existing one, and >> adds a line to a file.
##1. Get the line that contains the names.
##2. They are between double quotes, so using " as a delimiter
## splits the line into 5 strings, we want the 2nd and 4th.
##3. The last line has to be single-quoted because there is a semicolon
## character in it.
for f in ./*.xml; do
gg=`cat "$f" | grep "screensaver name"`
ggfile=`echo $gg | cut -d'"' -f2`
ggname=`echo $gg | cut -d'"' -f4`
echo [Desktop Entry] > $dirdest/"$ggfile".desktop
echo Type=Application >> $dirdest/"$ggfile".desktop
echo Name="$ggname" >> $dirdest/"$ggfile".desktop
echo Exec=$direxec/"$ggfile" -root >> $dirdest/"$ggfile".desktop
echo TryExec=$direxec/"$ggfile" >> $dirdest/"$ggfile".desktop
echo 'Categories=Screensaver;' >> $dirdest/"$ggfile".desktop
echo Hidden=true >> $dirdest/"$ggfile".desktop
done
Run It As Root. Hey Presto, you have a huge list of screensavers available in the XFCE screensaver applet.
If, at any time in the future, you add to your list of xscreensaver themes, run the script again. It will build the .desktop files up again from scratch.