> On Mon, Sep 20, 2010 at 11:49:48PM +0530, Nitesh Mistry wrote: >> I am doing this little experiment in cron, but not able to make it work. >> >> I want cron to play a certain mp3 file at a certain time. So I add the >> usual time parameters and add the following to the command field: >> /usr/bin/ffplay <path to my mp3 file> >> >> But cron mails me an error which I have attached as text file. >> >> I also tried "/bin/bash /usr/bin/ffplay <path to my mp3 file>" but it >> does not work. >> >> Where am I going wrong?
you are trying executing (via cron) a Graphical program without a display.environment. >> When I simply give the following command from terminal, it plays the >> file: >> ffplay <mp3 file> Try a command line player like mplayer or cvlc cvlc file:///<path to your mp3 file> >> --> Initialization error! >> Could not initialize SDL - DirectFBCreate: Initialization error! cron is not associated with any X session. > > This seems to a problem with ffplay. It worked fine with cvlc. Sorry to > bother all you people. Not at all. Experimentation is a great way to learn how Linux works. > But there is one more thing. Cron executes the 'fetchmail' command listed > in my crontab list irrespective of whether I am logged in or not. But it fetchmail does not need access to any special devices like audio/video applications. > executes the vlc command only if I am logged in. What is the error message from cron? -- Arun Khan -- http://mm.glug-bom.org/mailman/listinfo/linuxers

