Application to notify user of active VNC connection I want something more visual than Apple’s very subtle binoculars in the top right status menu when there is an active incoming VNC connection to the machine.

Preferably just a floating window notifying the user that there is an active VNC connection, and maybe the IP address. The best solution I have found is running the below command in the Terminal. But that doesn’t really solve my monitoring issue as I actively have to go and find the data.

netstat -a | grep vnc | grep ESTABLISHED
You always can make this script and run from a terminal

#!/bin/bash

alertme() {
    say "Big brother watching"
}

while :
do    
  netstat -a | grep vnc | grep ESTABLISHED &amp;&amp; alertme
  sleep 60 #wait 60 seconds
done


and you got a spoken warning. If you save the script with .command extension, you can start it from the finder by doubleclick.

You can install growl from the Extras directory the growlnotify package. You can change the say in the alertme to:

growlnotify --appIcon TextEdit "Big brother"  -m 'watching'


and got an notifying window.

Or, you can make Automator workflow with shell script &amp; popup-window alert. :)

Or, you can use the next:

sudo fs_usage -f network AppleVNCServer | grep -E '(accept|close)'


instead of netstat | grep and will get exact connect and disconnect times, like next, but you need run it as admin... (sudo).

14:19:20  accept                                                                                             0.000024   AppleVNCServ
14:19:33  close                                                                                              0.000047   AppleVNCServ
14:27:01  accept                                                                                             0.000024   AppleVNCServ
14:28:19  close                                                                                              0.000055   AppleVNCServ
14:28:26  accept                                                                                             0.000018   AppleVNCServ
14:28:34  close                                                                                              0.000037   AppleVNCServ