I have a script which runs various FFS batch jobs without a problem when initiated from a Linux Mint Terminal window. However, when initiated by cron all the FFS batch jobs fail -
Error: Unable to initialize GTK+, is DISPLAY set properly?
***** Sorted *****
I ran env in Terminal and compared it with running env in the cron job. I then added the following Terminal env variables to the crontab entry:
Although it's nothing to do with FFS I also got 'No volume for device file' errors when running 'gio mount -d' commands.
Adding the following Terminal env variable to the crontab entry fixed it:
P.S. I wish I'd searched the Forum on 'cron' rather than 'gtk', then I'd have found out without having to experiment for myself that I only needed the DISPLAY=:0 variable. I've since removed the GTK_ variables with no problems.
Get help for specific problems
1 post • Page 1 of 1
- Posts: 7
- Joined: 4 Jun 2019