I am using Ubuntu 16.06 and here is my shell script:
#!/bin/sh
recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/Videos/test/rec_`date +%Y%m%d_%H%M%S`.ogv
when i run the script from the terminal like that ./script.sh
everything goes well and running.
However when i place an cronjob looking like that:
*/1 * * * * /home/square/playground/script.sh &>/home/square/playground/mylog.log
The command:
recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/Videos/test/rec_`date +%Y%m%d_%H%M%S`.ogv
Is not working. I have no idea why it is running when i run the script.sh
from the terminal, but it is not working via the cron job.
Do you have any idea how i can fix that ?
export DISPLAY=:0.0
in script. – d a i s y Nov 17 '16 at 10:40