How to automatically open .torrent and other files in Safari.
Posted on March 14, 2008
Filed Under Links, Mac
This an upgrade of the previous post, now much simpler and works with Snow Leopard too.
- First, you have to modify what Safari considers as a “safe” file. Check the option Open “safe” files after downloading in Safari’s Preferences panel.
- Download this plist and put it in the folder <your-username>/Library/Preferences.
- Finally restart Safari, that’s it!
If you want to digg deeper down: follow this guide.
- Create the file com.apple.DownloadAssessment.plist (if it doesn’t already exist) in the folder <your-username>/Library/Preferences.
- Then copy & paste the xml code stated below in the file. In this example for a .torrent file.
- Save it, restart Safari … and voilà!
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com-PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>LSRiskCategorySafe</key>
<dict>
<key>LSRiskCategoryExtensions</key>
<array>
<string>torrent</string>
</array>
</dict>
</dict>
</plist>
Added on december 26th 2009. Thanks to Pan Maselko for this notice.
The most important part of the XML above is the <string>torrent</string> part. This describes the extension (.torrent) which is considered as safe for safari. So that, you can do this for almost any type of file, for example for .psd files. And of course you can have more than one extension to be safe at the same time. This can be done like this:
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com-PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>LSRiskCategorySafe</key>
<dict>
<key>LSRiskCategoryExtensions</key>
<array>
<string>torrent</string>
<string>psd</string>
<string>xyz</string>
</array>
</dict>
</dict>
</plist>
There are, however, some restrictions which are apparently designed by Apple: the extensions .rar .7z do not work for example.
Comments
13 Responses to “How to automatically open .torrent and other files in Safari.”
Leave a Reply


thanks for this… works a treat!
Outstanding source! Worked flawlessly… had to restart safari 4 beta for it to take affect.
[...] Thanks to Manuel Studer for this [...]
I’ve always been annoyed that Safari wouldn’t open Quicken (.qdfm) files. This worked. Thanks!
Tks!, it works great as in Firefox but Safari 4 is so…cool!
… and so fast too.
thanks alot man, this worked great
I can’t get this to work in Snow Leopard. Any ideas?
@Chris
I’m going to install Snow Leopard next week, so maybe there is another solution.
WHY do they make it so damn hard? Morons.
This works for me in Snow Leopard no problem.
Excellent… saved me loads of time getting Citrix to run properly for work. THANK YOU!
thank you, but the plist link is a 404