Xterm -display :0 -e $command fails to run from cron

Hi, I'm trying to run a cron script on my FreeBSD box. I used crontab to edit it and it is running as a non-root user. I have a line in it that says:
Code:
   0   7      *       *       1-4     xterm -display :0 -e ls
. For some reason, it fails to execute. I've tried running other commands from xterm, but they fail. My $DISPLAY var is set to :0. Even when I try to
Code:
xterm -display :0 -e ls
from a ttyv, it fails to run as expected (with no output from the console). When I run the same command on an xterm. it works as expected. Does anyone know what might be wrong? Also, note that this is for running an audio file with mplayer as an alarm clock. I've already tried alarm-clock, but it breaks a lot and has no command line interface anyway.
 
Back
Top