Lockdown

I bring my MacbookPro with me to work everyday. I normally do not have a password on my screensaver, but I work with some pranksters that may want to mess with me while I am away from my desk, so I want to lock it down when I walk away. I have found a useful combination of apps that will get this done for me with very little work.

Marco Polo is a neat little bit of software that will tell you machine to do different things based on current status. For example you can have it enable the screensaver password when you are connected to the Wi-Fi at work, and disable the password requirement when you get back home. The software looks at a variety of factors called Evidence, which can be a WiFi connection, a specific program running time of day and so on. Then based on the evidence it finds changes determines the machines Context like Home or work. Based on the context you can set of different rules or actions to take place.

I have set 2 contexts on my machine Home and Work, based on the time of day. I would have liked to use WiFi as my rule, however MarcoPolo does not appear to see Hidden SSID’s which my work network is. So I opted to go with the Time of Day Rules and put in my work schedule, which will set the context to Work. When the context is set to work, I have MarcoPolo enable the screensaver password and launch the application Proximity.

Proximity is a small app that looks for a paired Bluetooth device and runs an Applescript for in range and another for out of range. There are several posts on the interwebs where people have gotten cell phones to sync contacts, check email and a whole host of other things. All I want it to do is activate my screensaver when I walk away and turn it off when I come back.

The activation script is fairly easy, with Script editor enter the following code Pretty straight forward, it will turn on the screensaver which is password protected – locking my Mac from pranking or snooping co workers.

tell application “ScreenSaverEngine” to activate

Now getting my mac to automatically unlock when I get back was a bit tricker. Since the screensaver is password protected I have to get the password entered.

tell application “System Events”

keystroke return

delay 1

keystroke enter your ScreenSaver password here

delay 1

keystroke return

end tell


This will type the password and “press” ok to unlock the screensaver.

It is pretty straight forward and easy to set up, and offers a bit of extra securityto my Mac when I am at work. Since I don’t need the extra protection at home MarcoPolo turns off the screensaver password quits Proximity.

With these two little programs I have a automatic way to boost the security on my macbook when I am at the office, never a bad thing to have



iTunes Auto Importing/Syncing

— UPDATE —  Well Apple you have finally fixed this up for me with iTunes 9.  Between the new Home Sharing feature that was widely talked about and the little tidbit of the “Automatically Add to iTunes” folder that was put in my automator actions are pretty much not needed.  I may tweak them so it will copy new music to the “Auto Folder” from one mac to another.

I tested this out today and it works like a charm, happy day.

We have 2 Macs at home and 2 iPods, and a fairly large music collection.  I like to maintain the same music collection on the 2 Macs, but sometimes I buy a song on my laptop, my wife rips a cd on the iMac and keeping the collections in sync is a pain.  I figured out a way that works well for me to Automagically keep things in sync using Automator and iCal plugins.  I created a workflow that will look at the iTunes music folder for anything that was added today and then copy the songs to my server.  After creating and testing the workflow, I saved it as an iCal plugin that runs every night.

Searches iTunes Music Folder and copies to server
Searches iTunes Music Folder and copies to server

This works great on the iMac that is at home with the server which is pretty much always mounted.  However, if the server is not mounted there was an error in the workflow as there was no place to copy the files to.  Automator to the rescue!  I made another workflow that will mount my server, and I have this set up to run first in iCal. I tried to do this all as one workflow, but it would never work correctly.  I will continue to play with it and see if I can get it all as one workflow.

This Workflow will connect to the server if it is not mounted
This Workflow will connect to the server if it is not mounted

So, now the iMac is automatically mounting my server, and copying any new music to it.  How to get this new aural goodness to my MacBook.  Since iTunes does not monitor folder (maybe in iTunes 9, please) I have more Automator voodoo to take care of it for me.

Workflow looks at the server and imports new tracks to iTunes
Workflow looks at the server and imports new tracks to iTunes

I started with the script to mount my server as my MacBook is not at home most of the time.  Then I have a second script that will look at the New Music folder on the server (that is target for the iMac workflow), and if it finds and Audio files that were added today, it will import them into iTunes.  You can choose a specific playlist or just to the iTunes library.  So far this is working really well for getting the new music from the iMac to the MBP.  I will be writing a second batch of workflow to go the other way (From MBP to the iMac).  If all goes as planned I will not have to manually manage the music between the machines.

I will update with any issues that I run into as time goes by…

–edit – fixed images —

2 macs 1 backup

I became a mac user a bit over a year ago when my windohs box finally died.  I wanted something new and easier so off the the Apple Store we went.  I purchased a 20″ iMac, and the world was a happy place.  Sometime later my windohs laptop mainboard went sizzle and I needed a new laptop.  My wife, how by the way is super cool headed off the the Apple Store and got me the machine I wanted.  Correction she got me a better machine that what I had decided on.  I was going to be happy with a 13″ MacBook, the wife (did I mention that she was super cool) got me the fully loaded 15″ MBP.  Mike was happy, and still is.  So now we have 2 happy Macs and I want a way to back up and sync files between the pair.

I looked at the Apple Time Capsule – great features, not so great on the price.  1TB at the time was $499, and I couldn’t quite do all that I wanted to. FreeNas was looking pretty good as a low overhead option, and I had a bunch of parts laying about to build a system.  I did not have a vast amount of storage, but was able to try it out as a Time Machine backup.  This set up worked well, but still was not all that I was looking for.  So after much looking I stumbled across this post http://tinyurl.com/lqtr24 on how to make a server using Ubuntu, netatalk and avahi.  It was promising and since I have some knowledge of Ubuntu, not too difficult.  I ordered a new small form factor case, an Intel Atom mb/cpu combo and a hard drive and it was off to the races.  I have been running this set up for a few weeks now and it is working great.  In later posts I will talk about some of the things that I am doing with it, and some of the custom configs that I am doing to make this a great option for syncing 2 macs 🙂