#!/bin/sh scale=1 while [ $QUERY_STRING ] do if echo $QUERY_STRING | grep \& > /dev/null 2>&1 then current=`echo $QUERY_STRING | cut -f1 -d\&` QUERY_STRING=`echo $QUERY_STRING | cut -f2- -d\&` else current=`echo $QUERY_STRING` QUERY_STRING='' fi var=`echo $current | cut -f1 -d=` val=`echo $current | cut -f2 -d=` eval $var=$val done if [ ! $x ] then x=0 fi if [ ! $display ] then echo "Content-type: text/html

Screenshot

Machine :

Echelle :

" exit fi echo -e "Content-type: image/jpeg\n" /usr/X11R6/bin/xwd -display $display:$x -root | xwdtopnm | pnmscalefixed $scale | ppmtojpeg --quality 60