Welcome to MikeSel.info

  • Home
  • How-To's
    • Operating System How To's

      • IOS
      • OSX
      • Linux
      • Windows
    • Programming How To's

      • Apple Script
      • iOS Shortcuts
      • Powershell
      • Python
      • VB.NET
      • VBA
      • VBScript
    • CMS How To's

      • Wordpress
    • Security How To’s

      • Encryption
    • Home Automation

      • Homekit
      • Homebridge
  • News
    • Android News
    • Apple News
    • Gaming News
    • General News
    • Microsoft News
  • Security
  • Rumours

Login

Lock your mac with a click of your mouse

April 21, 2010June 17, 2015 Mike Hudson 3 Comments

In the interests of security it’s best to lock your machine as soon as you leave it. Perhaps more relevant to an iMac over a MacBook (as im sure you would never leave your MacBook unattended) but still important either way.

There are a few options for locking your machine, i recently blogged about one of the more geeky methods ‘AirLock‘ which uses a bluetooth proximity system to lock you’re machine when you are more then a specified distance away. However, as we all know bluetooth sucks power faster then a Dyson vacuum cleaner sucks sand in a desert. So for a less ‘power hungry’ method you can use the  ‘Automator‘ to build a shortcut which locks the screen at the click of your mouse.
This method using a single line of ‘shell code’:
/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession -suspend
Which uses the ‘fast users’ switching method to secure your mac. Not only is this click and simple, but it’s also quite cool as the Mac screen will rotate round in a ‘cube’ like motion.
To turn this line of code into a shortcut you can run, start the Automator application using you’re favourite app launcher or click the icon in the Applications folder.

Once launched you will be presented with a choice of templates for your Automator project. For this particular project select the ‘Application’ template. Once the template has done loading type ‘Run’ into the search panel on the left. You should see the list filtering away to leave a collection of options. Double click on the ‘Run shell script’ option. Once done amend the code in the Shell script window so it looks like the following screen shot:

 

Once done, you can either test it using the ‘Run’ button, or save it to a location of your choice. 
Now all you need to do is click the .App file to lock your machine. 
If you’re feeling a bit more adventurous you can use the ‘Automator’ application to expand the project and add user prompts or logging etc.

Read More

Tag Cloud

Android Apple App Store Backup BETA cloud Download Facebook Free Gaming Google Health iOS iPad iPhone iTunes Linux Lion Lync Mac Mac OS X Microsoft Mike Hudson MikeSel mobile Mountain Lion OS X Remote Secure Snow Leopard SPB storage Terminal TV Twitter VB VB.NET VBA VBScript Vista Visual Basic Windows Windows Mobile WWDC XP

Recent Comments

  • NightReaper58 on Resolved: Inconsistency in the installer database.
  • How To Show Hidden Files On Cd | travel news on Show hidden files Mac OS X 10.7, 10.8, 10.9 and 10.10 Yosemite
  • How To Show Hidden Pc Files On Mac | travel news on Show hidden files Mac OS X 10.7, 10.8, 10.9 and 10.10 Yosemite
  • Szilveszter Dömötör on How I built an Ms Lync ‘Bot’ formally known as D.A.V.E.
  • Steven Tischler on Parrot Asteroid Mini Review

Popular Posts

Show hidden files Mac OS X 10.7, 10.8, 10.9 and 10.10 Yosemite 31 Jul , 2014
Disable spotlight indexing – OS X Lion and Mountain Lion 17 Jul , 2011
FIXED: Do you want the application “iTunes.app” to accept incoming network connections? 26 Jun , 2011
FIXED: Time Machine error SparseBundle already in use 08 Jul , 2011
How I built an Ms Lync ‘Bot’ formally known as D.A.V.E. 16 Mar , 2013
Purge empty Ms Outlook Folders with VBA 30 Dec , 2010
Copyright © 2016 The home of Mike Hudson Theme by Colorlib Powered by WordPress
 

Loading Comments...