更多细节可能有用......
在控制台上或使用vncserver在X会话中启动firefox(或其他浏览器)。您可以使用--height和--width选项将窗口大小设置为全屏。另一个firefox命令可用于设置第一个firefox窗口中显示的URL。现在,您可以使用以下几个命令之一来获取屏幕图像,例如Imagemagick包中的“import”命令,或使用gimp,或fbgrab或xv。
#!/bin/sh
# start a server with a specific DISPLAY
vncserver :11 -geometry 1024x768
# start firefox in this vnc session
firefox --display :11
# read URLs from a data file in a loop
count=1
while read url
do
# send URL to the firefox session
firefox --display :11 $url
# take a picture after waiting a bit for the load to finish
sleep 5
import -window root image$count.jpg
count=`expr $count + 1`
done < url_list.txt
# clean up when done
vncserver -kill :11