Created
July 20, 2013 16:23
-
-
Save cuibonobo/6045614 to your computer and use it in GitHub Desktop.
Detect if there is someone remotely viewing your computer. (Taken from http://apple.stackexchange.com/questions/15945/application-to-notify-user-of-active-vnc-connection)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
alertme() { | |
say "Big brother watching" | |
# If you want a Growl notification: | |
# growlnotify --appIcon TextEdit "Big brother" -m 'watching' | |
} | |
while : | |
do | |
netstat -a | grep vnc | grep ESTABLISHED && alertme | |
sleep 60 #wait 60 seconds | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment