I have a very simple csh script that copies files each night. I wanted it to display a message on screen if some error occured. I can't figure out how to get a xmessage to work from a cron job. The xmessage in the script works if I run it manually or set it to run through cron a few minutes from now. But when I set it for 1am it won't display the xmessage. I have tried all the xauth, xhost, and DISPLAY settings I can think of. So far I have DISPLAY set to what I get from a terminal window (a strange /tmp/launch-ewSAT1/:0). I know there has to be a simple way to do this on OS X.
setenv DISPLAY /tmp/launch-ewSAT1/:0
/usr/X11/bin/xmessage "MAC-to-PC Backup Error: /Volumes/DavidFiles not mounted"
X connection to /tmp/launch-ewSAT1/:0 broken (explicit kill or server shutdown).
Thanks,
Chris
setenv DISPLAY /tmp/launch-ewSAT1/:0
/usr/X11/bin/xmessage "MAC-to-PC Backup Error: /Volumes/DavidFiles not mounted"
X connection to /tmp/launch-ewSAT1/:0 broken (explicit kill or server shutdown).
Thanks,
Chris