How to automatically open .torrent and other files in Safari.
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>
Update:
For .rar files, thanks to dsuddya
<!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>LSRiskCategoryContentTypes</key>
<array>
<string>public.archive</string>
</array>
<key>LSRiskCategoryExtensions</key>
<array>
<string>rar</string>
</array>
</dict>
</dict>
</plist>

