#! /usr/bin/env bash if [ "$1" = "--kinetd" ]; then # redirect stdin and stdout to the inetd socket. exec <&$2 >&$2 fi read request url httptype || exit 0 url="${url/ /}" httptype="${httptype/ /}" if [ "x$httptype" != "x" ]; then line="x" while [ -n "$line" ]; do read line || exit 0 line="${line/ /}" done fi # echo "url = $url, request = $request" >> /tmp/httpd.log case "$url" in /) # We need the size of the display for the current applet. size=`xdpyinfo -display :0| grep dimensions:|head -n 1|sed -e "s/.*dimensions: *//" -e "s/ pixels.*//"` width=`echo $size|sed -e "s/x.*//"` height=`echo $size|sed -e "s/.*x//"` # The VNC menubar is 20 pixels high ... height=$((height+20)) port=`dcop kded kinetd port krfb` if [ "$port" == "-1" ]; then port=5900 fi ctype="text/html" content="