How to Unlock Your Mac With Your iPhone

By , Jul 3, 2011

Imagine walking up to your Mac computer and watching it unlock on its own as you approached it. I’m not talking about retina or fingerprint scanners. I’m talking about Bluetooth proximity. If you have an iPhone on you at most times, and you also happen to own a Mac, you’re going to love this trick.

RedmondPie passed on this interesting tip this morning, which allows you to unlock your Mac computer simply by having a Bluetooth-capable device on you. It’s easy, completely free, and you aren’t even required to be jailbroken. Here’s how…

Step 1. Download this file. It contains 2 Apple Scripts and the Bluetooth proximity program for your Mac. Once downloaded, open it. You want to move all the files to a folder on your desktop for easy access.

Step 2. Double click on the icon that looks like the Bluetooth logo. The program should open up and install an icon in your menu bar. Click the new icon and select Preferences.

Step 3. Make sure device monitoring is enabled, and select the interval at which you want your Mac to look for the Bluetooth device. You’ll also want to select the device that your Mac recognizes. Make sure your iPhone’s Bluetooth is on and pair it up.

Step 4. Finally, you’ll add the Apple Scripts. In the Out of Range Script field, click Change. Select the Apple Script you just downloaded that’s labeled ‘outrange’. Then do the same thing with the In Range Script.

Step 5. That’s it! To test it out, try turning your iPhone’s Bluetooth off and on and see if your Mac responds.

You’ll notice these particular Apple Scripts are setup to start playing a song in iTunes when the computer unlocks. If you want to turn that off, just open up the ‘inrange’ Apple Script and delete the top line that says “tell application “iTunes” to play.”

I actually enjoy the iTunes autoplay function. When I walked in my front door from getting breakfast this morning, my Mac instantly turned on and started filling my apartment with music. Try and tell me that’s not at least a little bit awesome.

The cool thing is, there are tons of Apple Scripts spread throughout the web that can do so much more than lock and unlock your Mac. You can use this Bluetooth proximity tool to make your Mac do almost anything, like send an email out to colleagues that you’re away from your desk — simply by leaving your office.

What do you think?

  • Share:
  • Follow:
  • http://aldowynsmusings.tk abujaffer

    Pretty amazing; is there any way this can work with Windows? Since it’s Apple Scripts/code I doubt it but there’s probably some program like this out there. I hope. *More uncertainty*

    • LuvApple

      Hi abufaffer, u may try Teamviewer for windows.

      • BL

        How is Teamviewer going to do this, as far as I know it’s a remote desktop software?

  • http://sergey.chernyshov.ca Sergey

    It does not work. It askes me to pick an application Screensaver.app or something. Please help. :D

  • Nishant Jairath

    This is so cool.. i am going to try it now..!!

  • Nishant Jairath

    yea same here, where is this screensaverengine.app?

  • josh

    lol nice on taking the picture from lifehacker.

  • Lochie

    Does this bluetooth proximity work with PC’s?

  • Jelle

    Does it work with Leopard?

  • nleeb68

    Proximity doesnt run!

  • Peter

    Once there was an App for that called Sallingclicker. Then came the iPhone with no support of some essential Bluetooth functionality. I check 2times a year, but there is no support until now

  • Peter

    Once there was an App for that called Sallingclicker. Then came the iPhone with no support of some essential Bluetooth functionality. I check 2times a year, but there is no support until now

  • http://www.inkatechnology.co.uk Inkatechnology

    Works great for me. Had a little hiccup early but had great support for such a low priced app.

  • Shahzad

    work great.. where can i get more scripts? and is there a way to make multiple scripts work at the same time??

  • Eduardo

    looking for something alike for the windows.

  • javid

    The inrange doesn’t work here: The screensaver itself goes away (screen is black with just the mouse), there is no box to enter the passwort but if i enter the passwort (i can not see what i type) the screensaver quits completely and i can continue working … whats wrong here?

  • http://www.facebook.com/jordet Michael Jordet

    @javid… Yeah, I get the same thing as you. When I get within range, the screensaver stops, itunes starts playing but the screen remains black until I blindly enter my password.

    @ Shahzad… I also have the same questions. More scripts… multiple scripts… caller id up on my TV screen would be rad

    • Shahzad

      I’m having the same black screen problem… Any way around it?? I tried googling for this script but found nothing new.

  • Tissa

    Doesn’t work ((( can’t launch the proximity app

  • Erik

    Create a password in Keychain Access (named maybe AdminPassword).

    Then add this at the end of the inrange script:

    tell application “Keychain Scripting”
    set thePW to the password of first key of current keychain whose name is “AdminPassword”
    end tell

    tell application “System Events” to keystroke return
    delay 1
    tell application “System Events” to keystroke thePW
    – it types in your password for you
    delay 1
    tell application “System Events” to keystroke return

  • Harry Balzac

    Works, although I had to add the scripts into Proximity by hand.

    Eh.

    My bluetooth range is to far for this to be practical for me. It’s not a step-up-from-the-desk-and-lock app. I have to be well down the hall for this to work. Good if I leave the building and forget to lock my system.

  • http://revjoel.blogspot.com RevJoel

    The challenge I have is way back at pre-step 1. How on earth do you pair your iphone with your Mac via bluetooth? I cannot get them to pair for nuthin!

    • http://www.iphonedownloadblog.com Cody

      Pairing doesn’t happen until step 3. You should be using the proximity client to find your iPhone by clicking “change device.” Make sure the bluetooth in both your phone and your Mac is on.

  • http://kprops.blogspot.com kevin

    Improvement on the above method that shows you how to turn off the screen, not just run the screen saver.

    http://goo.gl/RcpUu

    • AK_____28

      @kevin

      Adding,

      tell application “Terminal” to quit

      after the last ‘end tell’ in your script will cleanly close the terminal window when it wakes the display. This way it requires no further interaction from the user. Walk away, it sleeps. Come back and it wakes. No need to close terminal manually after it wakes. :-)

      • http://kprops.blogspot.com kevin

        ak_28, thx! :) u kno, I did that actually, after I started getting annoyed by all the remnant terminal windows hanging around. i used killall. ill have to update my blog post with it. for everyone having problems with the black screen, the problem is that you can’t tell security to not require a password while it is currently secured by one. I think that is intentionally built in as a security measure. the keychain scripting method mentioned above gets around this tho. if u look at my post above there is more thorough instructions.

      • http://kprops.blogspot.com kevin

        ak_28, thx! :) u kno, I did that actually, after I started getting annoyed by all the remnant terminal windows hanging around. i used killall. ill have to update my blog post with it. for everyone having problems with the black screen, the problem is that you can’t tell security to not require a password while it is currently secured by one. I think that is intentionally built into osx. the keychain scripting method mentioned above gets around this tho. if u look at my post above there is more thorough instructions.

  • http://kprops.blogspot.com kevin

    oops, damn att poor signal, posted twice w/o realizing

  • http://aserettt.tumblr.com teresa

    this is siiiiick.