Hello,
I have the same request as Dane. I checked out Rohos but it does more than I need it an actually caused system problems for me. I just posted the request below at MacScripter.net but I would really appreciate advice or help from any of you.
Thank you,
Erik
http://macscripter.net/viewtopic.php?pid=149844Hello,
I am writing to request help with configuring my MBP so that it the screen will lock when I remove my Yubikey (
http://www.yubico.com/personal-use - “The YubiKey is a hardware authentication token that looks like a small USB memory stick, but it is actually a keyboard.”) from a USB port. I do not need any sort of unlocking capability upon reinsertion of the Yubikey.
There is an application called Rohos (
http://www.rohos.com/products/rohos-logon-key-for-mac) that can sense removal of the Yubikey and lock the screen. However, the application costs $32 and it does far more than I want it to do. It also caused problems with logging into other user accounts.
There is an application called Proximity (
http://code.google.com/p/reduxcomputing-proximity) that will execute a script if a paired Bluetooth device loses connection with the Mac. I like the basic functionality but would like for the trigger to be removal of the USB Yubikey.
I wonder if I could use Launchd (via Lingon) to periodically check (every minute, perhaps) if the specific Yubikey is present. If it is not, it could run an script to that will lock the screen (or activate the screensaver). A script on this site (
http://macscripter.net/viewtopic.php?id=24748) seems to contain some of the features I need, but I am not sure if the Yubikey appears to the Mac as the UBS drive does. In terminal I navigated to Volumes and listed the contents but did not see the Yubikey.
Do any of you have any ideas or code?
Thank you!
Erik