How do you configure Safari auto-open?

So I changed the default app for .ics files (because of this) and now when I click on the "Export" link on Facebook and it feeds me a .ics file, Safari no longer auto-opens it. (Likewise here.)

I tried editing ~/Library/Preferences/com.apple.DownloadAssessment.plist and re-starting Safari, but that didn't work:

<?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>LSRiskCategorySafe</key>
 <dict>
   <key>LSRiskCategoryContentTypes</key>
   <array>
     <string>public.calendar-event</string>
   </array>
   <key>LSRiskCategoryExtensions</key>
   <array>
     <string>amz</string>
     <string>ics</string>
   </array>
 </dict>
</dict>
</plist>

The amz was in there already, which is the Amazon MP3 store downloader, and that works.

Any ideas?

Tags: , , ,

11 Responses:

  1. Dan Moore says:

    I know it doesn't necessarily help, but that's exactly what I did to get Citrix Receiver (.ica) files to auto-open. Perhaps Safari treats .ics files differently than others.

    • Dan Moore says:

      To be more accurate, I didn't do anything with the LSRiskCategoryContentTypes for .ica, only added the extension.

  2. Don says:

    I installed Default Apps years ago and it seems to still be working fine under Mountain Lion. Easier than jerking about with those files. http://www.rubicode.com/Software/RCDefaultApp/

    • jwz says:

      I don't see anything in the doc that says it lets you configure auto-open. It looks like it's just a wrapper over what you can do with Get Info in Finder.

      • Don says:

        Sorry - I mis-read. However I'd restart the machine before I did anything else; Apple seems to have now tightly integrated Safari just as obnoxiously as MS ever did with IE and I've been forced to reboot after an update. It wouldn't surprise me if that file is only read on startup or login. You might use a file monitoring tool to see if it gets accessed after your Safari restart if a reboot isn't convenient for some reason.

  3. I don't see anything in this that you didn't already do, but it implies you're on the right track, and also points to RCDefaultApp which lets you muck directly with the LaunchServices info.

    I wish something like RCDefaultApp was shipped by Apple as a developer tool, since I'm sure there are even more metadata knobs these days with gatekeeper and sandboxing.

  4. Try adding 'com.apple.ical.ics' to the LSRiskCategoryContentTypes array.

  5. Also, you might need to restart (or at least logout-login), since that isn't a Safari quarantine setting, but a system one.

  6. Adam Freidin says:

    You may need to mess with lsregister to update the cache of these files (logging out might not be enough), also, check Safari.app/Content/Info.plist to see if there's any mention of amz there.

    alias lsregister='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister'

    • jwz says:

      Well, rebooting and "lsregister -f" didn't help. Not sure what other variants of "mess with" might do anything, or whether the output of "-dump" tells me anything I need to know.