I try to get a scheduled job running with systemd timer and freefilesync. I've currently stuck with the following error message in journalctl -xe.
Error: Unable to initialize GTK+, is DISPLAY set properly?
DISPLAY=:0 freefilesync
export DISPLAY=:0
viewtopic.php?t=7838&sid=cf4be8b7bfd994d57ac7083a669a6805
Do you have an idea what I did wrong? Maybe something with the environment variable?
Thanks.
-------------------------------------------------------------------------------------------------
PS: Below is the config for systemd timer on Linux Mint 22
# ⚠️ Both names for timer and service have to match
# Persistent=true will execute missed job after wake up from sleep mode
sudo nano /etc/systemd/system/ffs-job.timer
# /etc/systemd/system/ffs-job.timer
# ffs-job.timer is a sample name and can be adjusted
[Unit]
Description=ffs job
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
sudo nano /etc/systemd/system/ffs-job.service
# /etc/systemd/system/myjob.service
# adjust the ExecStart path
[Unit]
Description=ffs job
[Service]
ExecStart=FreeFileSync "ExecStart=/path/to/script.ffs_batch"
sudo systemctl daemon-reload
sudo systemctl enable --now ffs-job.timer
journalctl -xe
journalctl -u ffs-job.timer
systemd-analyze verify /etc/systemd/system/ffs-job.timer
systemd-analyze verify /etc/systemd/system/ffs-job.service
systemctl start ffs-job.timer