Page 1 of 1

Vlc And Crontab, run vlc from crontab

Posted: 29 Nov 2006 09:39
by darkmac
I need to automatically play a video file at 6:30 AM and stop it at 10:30PM. So i used VLC. I`ve set the crontab as follow:


30 06 * * * user /usr/bin/vlc --loop /home/user/a.wmv
30 22 * * * user killall -9 vlc

the crontab does his job cause I see in /var/log/message that is executing. BUT nothing happends...nothing appears on the screen...if I manually run the command "/usr/bin/vlc --loop /home/user/a.wmv" from a shell everything works fine.

Can u ...someone... help me ?

Posted: 30 Nov 2006 03:12
by funman
you have to use the DISPLAY environement variable

like sh -c "DISPLAY=0:0 vlc video.mpg"