I discovered a great little app, Proximity, and have now made my Mac's security very seamless. This approach requires:
I frequent various sites such as Gizmodo, Lifehacker, TUAW, macosxhints, and many others, and I was pleasantly surprised to discover that I could have an Ubuntu-like security feature with my iPhone. In Ubuntu, I paired my old Nokia Bluetooth phone with my netbook via BlueProximity, which was a great little app that detected how close I was to my netbook, and either logged me out if I were outside of the proximity field (the phone was not being registered by BlueProximity), or if I came within the proximity field, I’d be seamlessly logged in again without any user intervention. I tried to find a Fink or a MacPort for BlueProximity, but this doesn’t exist. So I left it at that.
I then stumbled across Airlock, which just came out, but unfortunately costs money (~$7) and doesn’t seem to function well -- it generates a lot of false positives where it thinks that you are out of range when in fact you are sitting right in front of the computer.
After a bit more searching, I came across the wonderful little app called Proximity while reading about OS X pranks. Having zero experience with AppleScript, this was a good opportunity to dabble with the code and to find out some great uses for Proximity and AppleScripts.
2br
I did some searching for good AppleScripts, modified them, and made the following two scripts that work with Proximity. The first is the inrange script, which runs when your phone is detected:
--tell application "iTunes" to play --This is optional; if you want to play music when you are in the proximity of your computer, it will play ur music. Just delete the 2 minus signs in front of '--tell application "iTunes" to play' tell application "System Events" tell security preferences set require password to wake to false end tell end tell tell application "ScreenSaverEngine" to quit
--tell application "iTunes" to pause --again, this is optional, but if iTunes is playing, you might want to pause it; delete '--' tell application "System Events" tell security preferences set require password to wake to true end tell end tell -- start screensaver (which locks the screen) activate application "ScreenSaverEngine"
Mac OS X Hints
http://hints.macworld.com/article.php?story=20091221173111783