7
6
To analyze my own computer usage, not to spy on anyone (although it crossed my mind), I want to have cron capture the current screen every minute.
* * * * * /bin/bash -c "/usr/sbin/screencapture /somedir/screen.png"
in the crontab will execute and take a screen capture. However, it is totally black because it is not running as, well, me. Any idea how to allow a cron job to capture my screen?
Update: I added a say whoami to the same cron command and it confirms it is running as my user (no sudo or other users involved). I access the crontab from a terminal as myself.
So, it runs as me, but is not attached to my windowing system. Any ideas?
Are you adding this to your system (root) crontab, or your user crontab? – Richard Hoskins – 2009-08-21T04:49:22.637