tags:

views:

193

answers:

2

I'd like to start Firefox for example with no display associated and eventually take a screenshot with import.

Can I in fact make it periodically with cronjobs?

I'm now making a ssh -X connection, take the xwininfo for the window started in background and everything's OK. But I'd like to automate it.

+1  A: 

How about starting firefox inside a vncserver?

You can capture the value for $DISPLAY using grep

e.g.

export DISPLAY=`vncserver 2>&1 | egrep --only-matching ":[0-9]+" | head -n1`
Nick
+1  A: 

You could start Firefox inside Xvfb.

If you gave Xvfb its -fbdir option then you would also have the option to take your screenshot from the Xvfb framebuffer file. You would probably want to specify the same geometry for Xvfb and Firefox.

James