I want to launch/run /usr/bin/FreeFileSync
(FFS) from my crontab at most once a day, whenever the external backup target volume is mounted.
For that, I used @Germar's answer: i.e. a spooling-script that does a couple of tidy-up chores before calling a small backup-script as second argument to the spooling-script's basename. The called backup-script (the child process) in turn performs a check and calls FFS (the grand child process).
Because FFS opens its main GUI upon launch, I think I need to declare stdout
for instance as:
DISPLAY=:0.1; export DISPLAY # I have two screens
My question is whether I should declare my DISPLAY environment variable within the child script or within the parent spooling-script that calls it ?
Does @muru's answer applies in the case ? I.e. if I include the DISPLAY statement within the child script, do I need to source it inside the parent script, knowing I am dealing with an environment variable?