macOS menu contextual command to open a URL in Firefox, even if it isn't your default browser.
It lives in the Services submenu of an app's first menu, and also under services in Safari’s contextual menu.
-
You can get a built copy of
BrowserService.servicein a .zip file from the Releases section of this github project. Version 1 is built as a "Fat binary" so it will work on either Intel or Apple Silicon Macs. -
Open the Xcode project and in the Info panel of the BrowserService target change the
com.exampleprefix of the bundle Identifier fromcom.example.${PRODUCT_NAME:rfc1034identifier}to a domain you control. -
You may choose to adjust how the code is signed, but that isn't necessary.
-
In Xcode, choose Build from the Product menu
-
If you built it from source: from the Products group in Xcode's Product Navigator select
BrowserService.serviceand right-click to Show in Finder In the Finder, put
BrowserService.servicein yourLibrary/Servicesdirectory. -
If you downloaded the .zip from Releases, double-click on the zip for the Finder to extract
BrowserService.serviceand place it in yourLibrary/Servicesdirectory.
(Hold to the Option key on the Finder's 'Go' menu to find your Library folder.)
- In Settings > Keyboard > Keyboard Shortcuts > Services in the Text section check the checkbox to enable Open in Firefox. Click on the right edge of its table row to add a command-key-equivalent.
and
Normally, I go through the process of using Xcode's Archive command, then distribute the archive. In the past, this brought up a series of dialogs to let Apple upload and inspect the binary and cryptographically sign it. This time I could not get Xcode to allow me to upload the binary.
When I tested that BrowserService.service would work correctly using the .zip from Releases, the Mac complained that Apple had not verified it for security. To fix this, in Terminal, I did the following, to remove the extended attributes that macOS puts on files it has not verified.:
cd ~/Library/Services
xattr -dr com.apple.quarantine BrowserService.service
xattr -dr com.apple.provenance BrowserService.service
1.0 Initial Release
1.1 Available in any app, not just Safari.
Select a link then choose Open in Firefox from Services submenu of the right-click menu. You could assign a command key equivalent to make it even easier.
Currently, this opens default browser links in Firefox. If you want to open them in, for example, Chrome:
1.) Change the BrowserService.service Contents folder, change Info.plist Services User Data where it says org.mozilla.firefox change that to: com.google.Chrome and in Info.plist Services, change: These two occorences of Firefox to Chrome.
"Open links in Firefox";
"Open in Firefox";
• Apache license version 2

