I've the following command in my crontab to make automatic backups using FreeFileSync. It was working just fine on Ubuntu 20.04 but I've noticed it doesn't work anymore on Ubuntu 21.10.
30 12 * * * DISPLAY=:0 flatpak run org.freefilesync.FreeFileSync /home/toto/Backup.ffs_batch >/dev/null 2>&1
I've first added >/dev/null 2>&1
following the suggestion in this post because I found in /var/log/syslog it generated the following error:
(CRON) info (No MTA installed, discarding output)
I don't have any error anymore in /var/log/syslog after the following line:
(toto) CMD (DISPLAY=:0 flatpak run org.freefilesync.FreeFileSync /home/toto/Backup.ffs_batch >/dev/null 2>&1)
However, nothing seems to happen. FreeFileSync never starts.
It seems that there is a solution here which involves uninstalling the flatpak version of FreeFileSync and reinstalling it from the run-file of FreeFileSync website. I would prefer to keep the flatpak version because it makes automatic updates of the package.
Many thanks for your help.
EDIT: I've replaced >/dev/null
by >/home/toto/crontab.log
to redirect the error to a log file. Here is the error I get:
bwrap: Can't find source path /tmp/.X11-unix/X0: No such file or directory
There is a discussion about Flatpak involving such error here, but I'm not skilled enough to understand what solution they are suggesting.