How-To: Remote Lock for your Mac
Apple’s new Find My iPhone and Remote Wipe MobileMe features got me thinking: shouldn’t there be an easy way to do something similar for your MacBook? After searching for Freeware and coming up empty, I came up with my own solution. I doubt the Department of Defense will take it up as new practice, but it’s handy never-the-less. This trick is crude, but it will “lock” your Mac from anywhere you get cell coverage.
What you’ll need:
- A Mac running 10.4+
- A mobile phone with text messaging capabilities
- An e-mail account set-up with Apple Mail
Step 1
Direct your browser over to the Apple.com download section, find the Lock Desktop 1.0 automator application, and download it to your Mac. (if you prefer, you can build your own workflow in Automator and save it as an Application. I personally would prefer to just put my Mac to sleep, so I built an Automator workflow to sleep my Mac, and went to File-Save As… and chose “Application” as my file type. You must have the screen lock enabled in your security System Preferences for that to work though.)
Step 2
Now we’re going to write a short AppleScript, but don’t worry – it’s only one line. Open up Script Editor (Found in /Applications/AppleScript), and copy and paste the following line:
activate application "Lock Desktop"
If you created your own application in Step 2, then use that application name in place of Lock Desktop.
Now save this script in the same folder that you’ve saved your locking application. You should be able to click Run to test that your script is working.
Step 3
Now for the fun part. Launch Mail, open up the preferences, and navigate to the “Rules” tab. Click on “Add Rule,” and fill in the following information:
- Description: Remote Lock
- If all of the following conditions are met:
- From | Is equal to “your phone’s e-mail” (if you don’t know your cell phone’s e-mail address see this guide, or simply send a text message to your e-mail and copy the “From” field)
- To | Is equal to “your e-mail address”
- Message Content | Is equal to “________” (choose a word or phrase like a password)
Now we’re going to tell Mail what to do if it gets the “lock” message:
- Delete Message
- Run AppleScript “_______” choose your script from the menu here

Step 4
The last step is to tell Mail to get new messages as often as possible. In the preferences window, click the General tab, and set Check for new mail to Every minute. If you want to be especially thorough, you can set Mail to open at login, assuring that your e-mail will be received. To do this control+click on the Mail icon on the dock, and select Open at Login.
We’re done! To test it out, send your password in a text message to that e-mail account, and within a minute your Mac should lock itself! This is especially handy if you want to lock your workstation while you’re out, or a great April Fool’s prank on a friend.

I wander what the effect of having a mobileme account would have on this act of remote locking? I guess if you don’t have the applescript installed it won’t work, but if you do have it installed on all your macs, then I guess you could in theory lock all you macs with one email.
This tutorial is great except for the fact that you cannot send a message to your computer using iPhone’s SMS. In the “TO:” field the SMS app will not let you type “@” or “.” so therefore I don not see how you can send to an email address. You also cannot paste the email address in 3.0, as soon as you move from the “TO” field to the “message” field it changes you address from joe@me.com to joemecom and does not send properly.
@Geoff
Good point! As an iPod touch user I often forget about this little quirk. On most phones you can send SMS to an e-mail address.
As for the iPhone, one option would be to set-up an alternate e-mail address on your computer to sync with Mail. Then when you send mail to that e-mail address from your iPhone, you could apply the rest of the tutorial around that alternate address. The second account is necessary incase your iPhone grabs the locking e-mail before your computer does.
Good Luck!
I think your blog is so nice.So I impressed your beautiful expression.I just bookmarked you…keep up the good work!!!!
laptop keyboard
computer keyboard
Computer Accessories