Using launchd to immortalize Quicksilver (howto)

I love Quicksilver, but the latest version crashes every once in a while. It’s not so frequent as to be really annoying, but the annoying part is that to re-launch it I have to go hunting in the Applications folder, or use Spotlight, none of which is an acceptable alternative being used to Quicksilver.

It occurred to me that I could use launchd to automatically re-launch QS when it crashes. It works very nicely, here’s what I did:

  • In the QS preferences, disable “start at login”
  • Create a new LaunchAgent in my account by storing the following file as ~/Library/LaunchAgents/org.quicksilver.plist (actually I used Lingon to create the file – very handy utility!):
    <?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>KeepAlive</key>
            <true/>
            <key>Label</key>
            <string>org.quicksilver</string>
            <key>ProgramArguments</key>
            <array>
                    <string>/Applications/Quicksilver.app/Contents/MacOS/Quicksilver</string>
            </array>
    </dict>
    </plist>
    
    
  • Log out and back in – voila! QS is started automatically, and if it dies for any reason, launchd will automatically restart it.

Of course, this can be used to immortalize any program that you want to keep running all the time.

Advertisements

5 responses to “Using launchd to immortalize Quicksilver (howto)

  1. Brilliant! Just did this trick myself and it works famously. I’ve crashed QS twice this afternoon and both times it popped back up with no effort.

  2. nice one! thanks for this. I’ve just discovered launchd, and I love it for stuff like this.

  3. I’m not sure why, but it worked fine on my G5 tower running Leopard, but didn’t work on my MacPro tower running Leopard.

    Any insight or am I just lucky that way? Thanks.

  4. seyDoggy, Jasper: thanks for the comments! I’m glad you found the tip useful.

    seyDoggy: not sure why it wouldn’t work on one machine. Are you sure you created the file correctly?

  5. I did the same thing in both cases, worked on one machine, not the other:

    • Copied your xml above
    • invoke Quicksilver
    • tap “.”
    • paste in the text box
    • tab to next panel
    • open text with PlistEdit Pro
    • Save as ~/Library/LaunchAgents/org.quicksilver.plist

    I’m trying to sort it out now but I am stumped.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s