Open With not sticking

An age old problem is that the Open All With does not stick. Some apps seem to reset that. Adobe used to do it (one of the many reasons I’m not using Adobe apps much, only a four-year old copy of Photoshop Elements), and now XCode did it to my .gpx files.

In writing this post I noticed the Change All… which is what I thought selecting, in this case TextMate would do. “Use this application to open all documents like this one.” seemed like it should to it. Change ll seems a bit redundant. I can guess that this means older documents keep whatever they were set to. But the situation that led me to this was a new .gpx document that opened in XCode (required an update since I don’t really use XCode). I think XCode did a Change All…

image

I see some referenced to lsregister, but that seems to be going deeper than this situation. Since this has existed for a decade or two, doubt it’s going to change soon. Doesn’t happen too often these days, but it does with other apps. Probably ones using a common extensions likes .jpg and .txt (somewhat obvious, .numbers isn’t going to get mucked with).

I guess the question is can I make the Open With stick? I say guess, because it’s probably out of my control. So maybe this gets counted as more of a rant.

Another offender is Nova, which I trialed (demoed), grabs .rb files. So maybe something with macOS that allows an installer to reset Open Withs without asking permission? If so, should file with Apple and wait five years for a fix.

I was thinking if I paid more attention I could tell my the thumbnail in the Finder, but sometimes the thumbnail is of the file not the app, so inconsistent interface.

As I understand it (and I could be wrong), macOS keeps two associations between files and apps:

  • A default association, based on file name/extension and (if nothing is associated with name/extension), the old type/creator codes.
  • A per-file association, which applies only for a single file.

When you do a “Get Info” and change the “Open with” value, you change that file’s association. It will affect what opens when you double-click that file, but it will not affect any other file with that type.

When you click “Change All…”, you change the default for that file’s type (name/extension or type/creator). But it does not sweep through your file system, removing any per-document associations that you may have previously created.

So, for example:

  • Starting from a default configuration where all text files open with TextEdit…
  • If I get the info for foo.txt and change it to open with Firefox, then double-clicking that icon will launch Firefox. But all other text files will continue to open with TextEdit
  • If I now get the info for bar.txt, change it to Emacs and click the “Change All…” button, then double-clicking it and all other text files will now launch Emacs. But foo.txt will still open with Firefox, because it has a per-file association that is not changed when the default is changed.

Note also that when you do a “Change All…”, it affects only a specific filename extension, not all extensions that may include the same type:
Screen Shot 2022-05-25 at 13.44.54
Note the last line: This change will apply to all documents with extension".txt".

It will not affect text files with a different extension, like foo.text.

3 Likes

Is there any way I can tell macOS that I don’t want anything to happen when I double-click files with a particular extension? Of course, this applies only to files that do not have the per-file association (or not, I don’t care). I would open such files by right-clicking or control-clicking and then choosing an app from the contextual menu.

Independently, is there a way I can tell macOS I don’t want anything to happen if I double-click the Quick Look window?

(@ace, please split this into a separate topic if appropriate.)

Nothing happens when I double click a Quick Look window. If by that you mean the window that opens when you spacebar on a file.

Good luck on the nothing happening on double clicking a file.

I wish someone would resurrect Magic Launch, which started out on snow leopard so you could still use type/creator fields for opening files in the right apps, but it had other criteria you could use, including UTIs and paths. It went through several developers, including Metakine and One Periodic (both now defunct). Still works in Sierra and superficially in Catalina (just did a quick test and used it to open epubs in bbedit; it didn’t need to talk to a server to register it either) but there’s no way to buy it anymore.

Why would you ever double-click a file if you didn’t want it opened? You say you don’t want anything to happen, so what would be the point in double-clicking it?

SwiftDefaultApps prefs panel is similar.

I wish I knew how you accomplished that. I do mean the window that opens when I press the space bar, and if I double-click in the window (or at least the scroll bar), the file opens in what I assume is the application listed in the Get Info window. In any event, it opens and gets added to the recent items menu.

Spastic fingers. In other words, an accidental double-clicking. The real problem is that it gets added to the recent items menu, which I occasionally use.

In the upper right corner of the window is a button "Open with ". Otherwise clicking or double-clicking everywhere else in the window does nothing, except the obvious icons on the menu bar (whatever the upper portion of the window is called). My wild guess would be an Accessibility setting of some kind is set differently than the default.

Sorry for the slow response. I’ve been (and still am) somewhat out of touch. Here’s what Ookla had to say. Is that a record?

Certainly double-clicking in the Quick Look window opens the file on my MBA M1 running macOS Big Sur 11.6.5. Your guess that an Accessibility setting causes this behavior seems reasonable, but I won’t get around to investigating that until later, and then it will probably slip my mind.