Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bogdanw

macrumors 603
Original poster
Mar 10, 2009
6,144
3,042
Since macOS Monterey 12.6.6, if I remember correctly and is probably the same for macOS Big Sur 11.7.7 and macOS Ventura 13.4, Apple has forced pkg files to be associated with the default installer. The association can not be changed the normal way (How to Manage File Associations in macOS) and Apple even removed other apps that could open pkg files from the “Open With” menu.

While I understand Apple’s decision and acknowledge it might have some security benefits for the majority of macOS users, I never install a pkg without looking what’s inside. :) So, the first action and the more common one is to open it with Suspicious Package.

I’ve already tried RCDefaultApp and SwiftDefaultApps with no success.

CrossOver uses the ~/.mime.types file to associate itself with .exe and .msi files. Example from the file

Code:
application/x-crossover-exe exe
# X-Created-By-mcap-CrossOver-0:application_x-crossover-exe=application_x-crossover-exe::run;application_x-crossover-exe::install

But I couldn't find any reliable information on how to asociate another extension to an app in the ~/.mime.types file.

Does anyone know how to edit ~/.mime.types or another way to associate pkg files with Suspicious Package?
 

chrfr

macrumors G5
Jul 11, 2009
13,729
7,306
Since macOS Monterey 12.6.6, if I remember correctly and is probably the same for macOS Big Sur 11.7.7 and macOS Ventura 13.4, Apple has forced pkg files to be associated with the default installer. The association can not be changed the normal way (How to Manage File Associations in macOS) and Apple even removed other apps that could open pkg files from the “Open With” menu.

While I understand Apple’s decision and acknowledge it might have some security benefits for the majority of macOS users, I never install a pkg without looking what’s inside. :) So, the first action and the more common one is to open it with Suspicious Package.

I’ve already tried RCDefaultApp and SwiftDefaultApps with no success.

CrossOver uses the ~/.mime.types file to associate itself with .exe and .msi files. Example from the file

Code:
application/x-crossover-exe exe
# X-Created-By-mcap-CrossOver-0:application_x-crossover-exe=application_x-crossover-exe::run;application_x-crossover-exe::install

But I couldn't find any reliable information on how to asociate another extension to an app in the ~/.mime.types file.

Does anyone know how to edit ~/.mime.types or another way to associate pkg files with Suspicious Package?
This functionality seems to be blocked but recent versions of Suspicious Package offer a service to open packages directly in SP. You stil can’t double click on a package to open it in Suspicious Package, but a right click/Services/Open in Suspicious Package works well enough for my uses.
 
  • Like
Reactions: bogdanw

bogdanw

macrumors 603
Original poster
Mar 10, 2009
6,144
3,042
Thank you for the answer.
I see now that it has been addressed in the FAQ section https://www.mothersruin.com/software/SuspiciousPackage/faq.html#finder-open-with
I have that option disabled, as I have other services that I use more frequently on files.
But I made a simple QuickAction with Automator that doesn’t show in the main context menu, so it doesn’t interfere with my regular actions.
Suspicious Package.jpg

I’m still interested to learn more about the .mime.types file.
 

gilby101

macrumors 68030
Mar 17, 2010
2,974
1,643
Tasmania
Two solutions I use:

1. In Finder's Column View, the preview for a package is Suspicious Package's quicklook which includes a button for "Open with Suspicious Package". From other Finder views, use Quicklook and then the button for SP.

2. I use ContextMenu extension for Finder and configured it to show Suspicious Package and Pacifist in the main Control-click dropdown (just for packages).
 

f54da

macrumors 6502a
Dec 22, 2021
504
186
Afaik ~/.mime.types is not used for file associations on mac, it's only read as a convention by certain cli software
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.