3.2 KiB
Extra Documentation
So I had a request to set the default Mail application in macOS from another tech. I did a bit of looking into this and found it was not the easiest thing to do. There are several third-party 'solutions' out there (see some below). While some work quite well (specifically most people use duti), some only did half of what I was wanting to accomplish. And mostly, I didn't want to have to package these utilities and deploy them, just to perform this task, if I didn't absolutely have too.
This script was inspired by @thoule & @scheb and miketaylr@GitHub. It will allow you to set the default application for both URL Schemes and Content Types (i.e. File Extensions). I wrote this for use in a JAMF environment utilizing JSS Script Parameters, but it isn't required obviously and those entries can be manually set.
Apple Official Documentation on Launch Services
Other 'complied' utilities that perform this task as well
- duti
- defaultapp
- LaunchSetter
- LaunchServices
- RCDefaultApp
- [IC-Switch] - doesn't seem to be mentioned on the developers website anymore, but I was able to find a link to download it from the dev's site.
Other random mentionings regarding configuring Launch Services
-
lsregister: How Files Are Handled in Mac OS X @ krypted.com
-
Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately? AskDifferent@StackExchange
-
Change file association in terminal? @ AskDifferent@StackExchange
-
How to change default app for all files of particular file type through terminal in OS X? @ SuperUser@StackExchange
-
How to set default application for specific file types in Mac OS X? @ StackOverflow
-
Change the default application (for a file extension) via script/command line? @ AskDifferent@StackExchange