I need to take regular screen-shots (every minute) of the display on a tinycore vm. It needs to be able to take screen-shots, of, say Firefox or a 3270 terminal emulator.
Originally, I used to use Xvfb + import for this, but due to changes in one of the web-pages I'm snapshotting, I need to be able to interact with it to log in (it uses a "special" login screen that I can't automate).
So my latest attempt is to use TinyCore + the firefox and screenshot.sh extensions. Screenshot.sh uses imlib2_grab, I've managed to get working from the command-line perfectly. Now I have got cron running, and added a crontab entry like this:
----------------------------------------------
* * * * * env DISPLAY=:0 /usr/local/bin/imlib2_grab /tmp/screenshot.png >> /tmp/grab.log 2>&1
----------------------------------------------
When I tail /var/log/messages I see the cron job successfully running, and /tmp/grab.log shows the following error message:
----------------------------------------------
No protocol specified
Can't open display :0
----------------------------------------------
If I can get this running, I can then install nginx and will then be able to make the screenshots available on the "smart" TV we use for monitoring the above mentioned web page (the TV can't cope with displaying the page directly).
It's either this or mess round with using a raspberry pi hooked directly to the TV....
TIA