M
Mitja
Shit, I had this legthy reply typed together, and then the comp crashes...
here it is in a much more condensed form:
No need for sarcasm, that's how I understood your post and replied with
the best intent. You get all sorts of questions in here.
You'll probably want a virtual X server to be able to run mozilla or
something in background, then take screenshots. Have a look at Xvfb.
~$ Xvfb :1 -display 0 1024x768x16
(display no. 1, screen 0 with given resolution)
Then run mozilla using that virtual display
~$ mozilla --display=:1 www.google.com
Then use (as has already been suggested) xwd or import to get the snapshot.
~$ xwd -display :1 -name "mozilla" -out foo.png
-name "mozilla" won't work, mozilla keeps changing its name with the title
of the site you're visiting. So you need to list open windows, see
xlsclients or xlswins. Then parse the output, maybe to get window id of
the mozilla.
See also mozilla -remote "openurl(www.othersite.com)" which should change
the active url of an already running mozilla.
I had problems with the last few things, but just don't have the energy to
write it down once more. Oh, I have to mention the garbled text I got in
mozilla's screenshots. And that xeyes and xlogo ran fine, producing
screenshots the way they should be. And that Xvfb doesn't even need X
running. And that with Opera, well, it's hidden in xlsclients output. And
maybe some other things I've forgotten. Jerky random thoughts, I'm low on
sleep, hope it's not too hard to read...
And google for xvfp screenshot script, I got fine results. Especially
http://www.bedroomlan.org/~alexios/coding_urlshot.html, but it might be
hard to get it to work.
Hope this gives you a good start.
here it is in a much more condensed form:
Really ?[/QUOTE]What you're looking for is called screen capturing software.
No need for sarcasm, that's how I understood your post and replied with
the best intent. You get all sorts of questions in here.
What I a m looking for should run on a linux system and be called by a
php or perl script and run in the background. Moreover it must be
installable
with normal user rights.
You'll probably want a virtual X server to be able to run mozilla or
something in background, then take screenshots. Have a look at Xvfb.
~$ Xvfb :1 -display 0 1024x768x16
(display no. 1, screen 0 with given resolution)
Then run mozilla using that virtual display
~$ mozilla --display=:1 www.google.com
Then use (as has already been suggested) xwd or import to get the snapshot.
~$ xwd -display :1 -name "mozilla" -out foo.png
-name "mozilla" won't work, mozilla keeps changing its name with the title
of the site you're visiting. So you need to list open windows, see
xlsclients or xlswins. Then parse the output, maybe to get window id of
the mozilla.
See also mozilla -remote "openurl(www.othersite.com)" which should change
the active url of an already running mozilla.
I had problems with the last few things, but just don't have the energy to
write it down once more. Oh, I have to mention the garbled text I got in
mozilla's screenshots. And that xeyes and xlogo ran fine, producing
screenshots the way they should be. And that Xvfb doesn't even need X
running. And that with Opera, well, it's hidden in xlsclients output. And
maybe some other things I've forgotten. Jerky random thoughts, I'm low on
sleep, hope it's not too hard to read...
And google for xvfp screenshot script, I got fine results. Especially
http://www.bedroomlan.org/~alexios/coding_urlshot.html, but it might be
hard to get it to work.
Hope this gives you a good start.