Is it possible to find out if a VNC connection is active
check the status of port 5900
You can use netstat to see if there is an established connection on the port your VNC server is listening on.
try netstat -an | find "ESTABLISHED" | find ":5900"
on Windows at the command prompt.
There'll be a line entry for it if someone is connected.
Note: If you're connecting to another server then this search will find that connection too, so pay attention to the presence of the :5900
in the second column from the left since this is the local machine.