Unable to open Anywhere option from Gatekeeper in order to open apps not from Mac App Store
Solution 1:
If you download an application from the internet, then the following steps can be taken to open the application. Here the Startup application is used as an example.
I downloaded the Startup application from the SourceForge project Startup for rEFInd. Here is my Downloads
folder.
Note: In Finder preferences, I have
Show all filename extensions
checked off.
When I double clicked on Startup.app
, I received the following popup.
I selected the Cancel
button. Next, I opened the Security & Privacy
pane of the System Preferences application, as shown below.
Here, I selected Open Anyway
and the the following popup occurred.
Here, I selected Open
and the application opened.
The above steps only had to be done once. Afterwards, the application could be opened by simply double clicking on the icon.
Note: The above steps did not remove the com.apple.quarantine
extended attribute placed on any files or folders.
How to Avoid the Above Steps
When a file is downloaded, the extended attribute named com.apple.quarantine
is placed on the file. This is what initially kept the Startup the application from opening. The following steps can be taken to remove the com.apple.quarantine
extended attribute from the application.
If you want to test these steps, then you will probably what to put any existing Startup application in the trash, and download a new copy of the application.
Right click the application in the Finder window and select New Terminal at Folder
, as shown below.
This will open a Terminal application window, as shown below.
Enter the following command, as shown in the image below.
xattr -rd com.apple.quarantine .
Next, close the Terminal application window. Now you can open the application normally.
Solution 2:
You don’t fix the output. Apple shipped both classes so Apple has to patch the libraries that spctl
links against to “fix” that log message.
It doesn’t harm any function I can test, so it’s highly likely it has no bearing to your running of spctl
. Your main problem is likely that you didn’t boot to recovery and use terminal app to change the security.
- https://support.apple.com/en-us/HT202491
- https://support.apple.com/guide/mac-help/about-macos-recovery-mchl46d531d6/mac
You can’t enable or disable from the OS that’s running. (Think of a surgeon, they can operate on another person, not themselves for safety sake.)
Recovery is a different OS that can change entitlements on your daily driver OS when it’s not running. (Or don’t do maintenance on your car/bike/airplane while it’s moving.)