Changing the Mac OS X default app for .webloc files to Google Chrome
ArticlesI sometimes like to save web locations as files when it makes sense to bookmark in my file system rather than in a browser’s Bookmarks Manager or in a text document. On Macs, dragging a webpage icon from a browser to Finder creates a file with the extension “.webloc”; Annoyingly, regardless of how one’s default browser is set, a .webloc file always opens in Safari.
A solution, detailed by Nathan Grigg on StackExchange, is to use a command line utility called duti.
First, install Homebrew by opening Terminal and typing:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, install duti by typing:
brew install duti
Finally, set the default app for .webloc files to Chrome:
duti -s com.google.Chrome com.apple.web-internet-location all