Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Use launchd to restart crashed apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Use launchd to restart crashed apps
Authored by: mlhoenig on Dec 23, '07 11:39:04AM
OK...being rather Terminal-impaired and mostly a hardware nut (though I've been a Mac user since '89 or so) I'm lost regarding exactly how to modify this for Safari and Mail, for instance.

Specifically, what do I name the .plist once I have it ready; and do I need separate files for each app I want to re-launch; I'm sure I can think of a few other questions, but these are the first two I absolutely need to understand in order to take advantage of this hint...

I've already created the following Plain-Text file using TextEdit:

<?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>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>com.apple.safari</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Safari.app/Contents/MacOS/Safari</string>
</array>
</dict>
</plist>

Thanks!

[ Reply to This | # ]
10.5: Use launchd to restart crashed apps
Authored by: Anonymous on Dec 23, '07 07:32:49PM

The file should be something akin to:

com.YOURSHORTUSERNAMEHERE.DescriptiveName.plist

So, for example, with my one for Quicksilver, I've named it:

com.mharris.Quicksilverwatch.plist

And, yes, you need separate files for each app you want to relaunch.



[ Reply to This | # ]