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

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
450
132
Say I have an application (doesn't matter which but in this case it's Mediainfo).
The app is currently not associated with image files.
  • MacOS will not let you drag&drop images onto the application.
  • If you right-click an image, the application does not show up in the "Open with" menu.
This application is perfectly capable of opening images. If I choose the File>Open from the menu in the app, I can open any image file. How do I make MacOS associate them?

I know what you are thinking right now, so before you say it ...

*** READ THIS PART VERY CAREFULLY ***
I am NOT asking how to make the application the default for opening the file. I want images to continue opening in Preview by default, as they do now. So please ... do not tell me to 'open with' and choose 'use this application to open all documents like this one' or 'Always open with'. I just want MacOS to not cockblock me from trying to use another app.
 
Right-click the file (yes I read what you posted :D)
Get Info
scroll down to Open With
click the drop-down
select Other...
change Recommended Applications to All Applications
select your app
click Add

You can now right click the file and select your app

this will not change your default - it will just add your app to the list

Voila!
 
You can now right click the file and select your app


You can right click on THIS particular file only. Not all files of the same type, which makes this method essentially useless.


Also, still can't drag the file to application icon in the dock or finder.
 
You can right click on THIS particular file only. Not all files of the same type, which makes this method essentially useless.


Also, still can't drag the file to application icon in the dock or finder.
Some apps simply don't support being able to drag a file onto them.
 
it's in the question.


but I'd like to know how to accomplish this with apps in general
 
but I'd like to know how to accomplish this with apps in general
I managed it by modifying:
/Applications/MediaInfo.app/Contents/Info.plist
Then search for CFBundleTypeExtensions and add another child with the desired extension (like jpg).
CFBundleTypeExtensions.png

For these changes to take effect, I moved the application to the desktop and back into the applications folder.
Now I can drag and drop 'jpg' files onto the dock icon which was not possible before.
I was surprised there was no resigning required but I use a pretty old version of Mediainfo.
 
So that's why!
I actually tried exactly this , but it caused the app to crash. Must be a security thing.
Thank you.
 
I tried the most recent version (MediaInfo_GUI_24.05_Mac) but this one won't even open video files when they're dragged onto the dock icon.
If your version allows for dragging files onto the icon, you could try the entries from above and completely remove the signature with:
codesign --remove-signature /Applications/MediaInfo.app
After the first attempt to open the unsigned application, you have to confirm it in macOS' security panel.
You could re-sign it but I don't know what difference that would make:
sudo codesign -f -s - --deep /Applications/MediaInfo.app
 
Still won't launch

I tried the most recent version (MediaInfo_GUI_24.05_Mac) but this one won't even open video files when they're dragged onto the dock icon.

I am using 24.05 from the app store. Dragging video works.

First I tried moving the application back and forth to another folder and that didn't work.

I tried
Code:
sudo codesign --force --deep --sign /path/to/application.app
but that said 'error: The specified item could not be found in the keychain.'

Code:
 codesign --remove-signature /Applications/MediaInfo.app
didn't work either

Code:
 sudo codesign -f -s - --deep /Applications/MediaInfo.app
this finally worked! I guess I got the syntax wrong.

Thank you so much for your time.

PS. I've also submitted a feature request ticket to the MediaArea folks on sourceforge, so maybe they'll fix it in the next version.
 

Attachments

  • Screenshot 2024-06-11 at 21.17.10.png
    Screenshot 2024-06-11 at 21.17.10.png
    776.1 KB · Views: 43
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.