Slow Startup in Mac OS X
25-Nov-2011 So for some time now whenever I start up my MacBook Pro everything took a long time to be ready to do what I told it. It would just sit there thinking for quite a while before it would accept any input or respond.
I only had one application start at login and that was Skype. The reason for this is because it is not an app I use, but one I want to have open in case someone wants to call me.
Anyway, I tried an experiment where I turned off Skype launching at start up and difference was amazing. I don't know if they have bad memory code on start up or what.
I still wanted to Skype to start up automatically, but wanted a faster start up time. The answer, as usual for me, was AppleScript, and it is a super simple one:
tell application "Skype"
delay 30
activate
end tell
Basically it just sits there for thirty seconds and then starts Skype. So copy and paste this into AppleScript Editor and save it somewhere out of the way. I put mine at /Applications/Scripts/LaunchSkype.scpt.
The next step is to automatically trigger the script. I use Lingon to create launchd scripts but you can also write them manually.
For example, create a file called say, com.liamhughes.LaunchSkype.plist, in ~/Library/LaunchAgents/ with the following contents:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>Label</key><string>com.liamhughes.LaunchSkype</string><key>ProgramArguments</key><array><string>osascript</string><string>/Applications/Scripts/LaunchSkype.scpt</string></array><key>RunAtLoad</key><true/></dict></plist>
This will cause your script to be run whenever you login to your computer.
Best of both worlds: fast start up time and automatic launch of Skype (or whatever application you want).
applescript,
launchd,
skype in
Mac