Do you utilize a background - only program ( no docking facility icon ) that ’s decisive to your workflow ? Something like Quicksilver , Butler , LaunchBar , orSnapzProX ? Like intimately all OS X applications , these programs do n’t crash very often . However , when they do , it can be troublesome , because they usually just sit there quietly in the desktop , waiting for you to do something . You only point out they ’ve crashed when you endeavor to use them to do a task . You then relaunch the political program , and it break back to work in the background signal . Would n’t it be squeamish if there were a way to mechanically resume a crashed software ?
If you ’re running oxygen X 10.4 , you could do this by remove advantage of the system’slaunchddaemonmanager.launchdhandles all of the organisation daemons , for things like networking , WWW serving , and printing , but it can also launch drug user daemons , which is what we ’ll use it for in this hint . By take advantage of alaunchdfeature , we ’ll be able to make a devil that watches for the evidence of a program crash , then re-start the programme . While you may create this daimon yourself , we ’re going to employ a free undecided - germ app to help speed the process — if you desire to do it on your own , this hintexplains the step you need to take .
For my example , I ’m going to employ SnapzPro — because it ’s an software I use constantly , and I need it to be always running . This is not to incriminate that it crash any more or less often than any other plan , but I had to habituate something as an exemplar !
Start by downloadingLingon , a in writing interface for creatinglaunchddaemons . After instal Lingon somewhere on your voiceless drive , launch it and clack the Assistant button in the toolbar . Since we ’re creating a job to relaunch a crashed program , choice “ operate an program program / script when a file is modified . ” You might think that “ Keep an app / hand always unravel ” would be the right selection , but if you habituate that option , then you wo n’t be able to quit the political program even when you desire to ! Using this approach shot , we ’ll just make trusted the computer programme restarts after a crash , allowing you to drop by the wayside it yourself if you want to . Click Next to go on to the Label dialogue , which is where you ’ll name your fresh daemon . The name you choose must be unique on your motorcar , and it should utilise “ rearward field naming , ” to match the normal used on OS X. I named my action com.robg . SnapzWatch , as seen here :
you could leave the other selection as they are , then cluck Next . The final Lingon screen is where you specify what single file will be plunge , and what file to watch for change that will induce the specified programme to plunge . For the program , penetrate on the Path clitoris , and then sail to the syllabus you ’d like to relaunch when it crashes . The only john here is that you want to show to the genuine executable file cabinet within the software big money , not the diligence bundle itself ( the file web web browser in Lingon will practice down into package mechanically to make this easy to do ) . For most atomic number 8 ten program , you ’ll discover the executable within the bundle in the Contents - > MacOS folder . For model , when I navigate to the Snapz executable , Lingon fill in the path : /Applications - > Snapz Pro X ( the leaflet ) - > Snapz Pro X.app ( the practical app pile ) - > Contents - > MacOS - > Snapz Pro X ( the existent workable ) . Once you have the program information fill in , drop down to the File box . This is where you ’ll telllaunchdwhich file to look on for change that indicate a clang has occur .
You might inquire what filing cabinet you could watch for tell when a file has crashed . The solution is that when a platform dash , it ’s supposed to write a crash log into your drug user ’s Library - > Logs - > CrashReporter pamphlet . If the CrashReporter file for a yield program has been change , then that means that program has crashed , and it need to be restarted . So in the File box , just voyage to your exploiter ’s CrashReporter folder and select the data file from the crashing syllabus . For Snapz Pro , that ’s Snapz Pro X.crash.log . Once that ’s done , get through Create and you ’re finished . From now on , if Snapz ever crashes , it will mechanically restart again .
Note that the crash log file must always exist in order for this to work . So if your app has n’t crash yet , you really ca n’t apply this lead ( as you do n’t cognize on the button what the logarithm file cabinet might be describe ) . If the logarithm file ever vanishes , thenlaunchdwill stop watching for change ( since it ca n’t find the file ) . If that come about , you ’ll need to make certain the file exist ( sluttish in Terminal , cdto the proper directory first , thentouch “ Snapz Pro X.crash.log ” ) , then lam Lingon again and click the Reload clit for your broker .
Ideally , we ’d take the time to send the log file to the developer , envision out why the clash happens , and preclude it from happening again … but sometimes , when deadlines call , we just need to get back to work . Lingon andlaunchdmake that about as easy as potential .