Creating a systemd service for xscreensaver
First, is to define a systemd service:
$ cat > ~/.config/systemd/user/xscreensaver.service <<EOF
[Unit]
Description=XScreenSaver
After=network.target
[Service]
ExecStart=/usr/bin/xscreensaver -nosplash
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
EOF
Then,
$ systemctl --user enable xscreensaver.service
$ systemctl --user start xscreensaver.service
$ systemctl --user status xscreensaver.service
BTW it could appear to fail at first if the xscreensaver daemon is already running. In that case, do:
$ pkill xscreensaver
Then check the status again, and it should now be active.
$ systemctl –user status xscreensaver.service