If anyone else out there uses the OSXvnc server from osxvnc.com [Update: osxvnc.com is no longer a Mac-related website; the domain expired and it's now run as a porn site! Do not try to visit there!] and used the OSXvnc-wrapper solution posted there to get it to automatically run and stay up, you may be interested in this script. You will have no doubt noticed when installing Classic applications under 10.1 that when it says it must close all applications, it means OSX applications as well. This gets into an interesting loop where it kills OSXvnc, which respawns, which then gets killed, etc. As a "hack" solution, I use the following as a replacement for the OSXvnc-wrapper file:
#!/bin/sh[Editor's note: the "while" command just inside the first 'do' loop has been broken onto two lines for easier readability. Put a space after "aux" and then everything from line two onto the same line.]
while true
do
while [ `ps -aux | grep 'Dock.app' | grep -v 'grep' | wc -l` = 1 -a `ps -aux
| grep 'Finder.app' | grep -v 'grep' | wc -l` = 0 ]
do
sleep 1
done
/Applications/OSXvnc.app/Contents/MacOS/OSXvnc-server `cat /etc/osxvnc-args`
sleep 10
done
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020103165510448