1

I'm trying to make an alarm clock using totem in crontab in Ubuntu 14.04. Reason for totem is because it seemed the easiest. I did test out the command totem --replace /home/edward/mornings.pls and all seemed to work as expected. I proceeded with to add this to the cron (note that it says 0 6 but I have set it to a time few minutes from "now"):

sudo crontab -e

0 6 * * * totem --replace /home/edward/mornings.pls

However, totem did not restart the playlist (yes, it was still open). I looked around a bit to try and troubleshoot things. /var/log/syslog shows that CRON seemed to execute it without problems:

Nov 20 06:00:01 compname CRON[24634]: (root) CMD (totem --replace /home/edward/mornings.pls)

I tried appending > /home/edward/mornjobs.txt to the end of the command to get some output (both > and &>). The file was empty. Looking some more, it was suggested that I should set the DISPLAY:

0 6 * * * DISPLAY=:0.0 && totem --replace /home/edward/mornings.pls &> /home/edward/mornjobs.txt

Tried without the &&, as DISPLAY=:0 and DISPLAY=:0.0, exported the DISPLAY and XAUTHORITY and still totem does not restart the playlist without (visible) error. Even shutting down totem doesn't open it anew. So what am I missing here?

1 Answer 1

0

Ok, turns out some programs won't run under root. Do NOT have sudo in the crontab -e for this particular moment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .