Keeping QuickSilver up with Launchd
launchd spawn processes and manage them, you can actually make use of it to help you out on OS X automation. I had the same exactly thought that Diego Zamboni had when wrote this blog post four years ago.
QuickSilver became part of my interactions with OS X for a while but QS is not perfect and sometimes crash or needs to be restarted. As Diego felt, I felt that when QS quits is annoying go chasing it again to restart it. For this
launchd can help you.
Start by disabling the Start at Login option of QS in its preferences.
After that adding the below XML as
~/Library/LaunchAgents/com.blacktree.Quicksilver.plist will do the trick of keep QS running, if it quits, it will be restarted automatically.
<?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.blacktree.Quicksilver</string> <key>LimitLoadToSessionType</key> <string>Aqua</string> <key>KeepAlive</key> <true/> <key>ProgramArguments</key> <array> <string>/Applications/Quicksilver.app/Contents/MacOS/Quicksilver</string> </array> </dict> </plist>
You can check the this Technical Note for a lot of details. But I will give a short explanation of what we have here.
Label- It's mandatory to identify the job and has to be unique, it has to match the file name (without the suffix .plist)
LimitLoadToSessionType- The context the job should run, Unix fellows this is similar to run levels. The value of
Aquameans full GUI.
ProgramArguments- Is actually what we want to run. Check the man
execvp(3)on the Terminal for more information.
That's it, log out and log in back again and you should see QS running. If you want to test if
launchd is managing your QS just quit it and you should see it running back again.