#! /bin/sh # Sleep a bit for safety. sleep 20 echo -n '.' > 2 # Check if a VNC session was started. if grep -q 'xinetd.*START.*vnc.*192.168.254.10' /var/log/auth.log; then : else echo 'xinetd did not start Xvnc.xf4' cat /var/log/auth.log exit 1 fi echo -n '.' > 2 # Check if the X authetication suceeded. if grep -q 'Invalid MIT-MAGIC-COOKIE-1 key' /var/log/mdkkdm.log; then echo 'the connection refused by X Authority' exit 1 fi