Hi,
A couple of years ago (in SuSE), I was able to get a particular cron job to
work. It uses ImageMagick. While I was able to get it to work by running it
from the terminal, cron failed. Someone in this newsgroup advised me to
precede the job with "export DISPLAY=localhost:0.0", which did the trick.
Having changed distributions, however, I am no longer able to get it to
work. In fact "export DISPLAY=localhost:0.0" leads to errors when running
it from the terminal, so it's now commented out.
Here is part of the script which I am able to run successfully from the
terminal:
#!/bin/sh
# export DISPLAY=localhost:0.0
# set display (to make cron job work)
###################################
# Get current virtual desktop
import -window root ~/public_html/screen-temp.jpeg
# capture display
mogrify -resize 25% -border 3 ~/public_html/screen-temp.jpeg
# save to temporary file so as to avoid full-sized
# image from being public for a second
convert ~/public_html/screen-temp.jpeg -font Bookman-DemiItalic -pointsize
20 -
[...]
|
|