How to clear the application used to open a file, i.e. set it to none

finderlaunch-services

When you double click a file the finder will select an application to open it with. What it's going to do can be viewed in the file's info panel. You can change it there too. Viewing some files you'll notice that they report the selected application as None.

I want to set a file's preferred application to none. But how? The option of clearing the preference back to None is not offered in the Info panel.

The two files I want to do this to are part of a set of files N files, half with no extension and half with an extension for which no application has registered any interest. So presumably something set a preference for the two files. I want to remove that preference.

Maybe this is done with lsregister, but I think that's only handling the wildcards. Maybe this is done with an extended attribute on the file; but xattr doesn't show anything.

Best Answer

The few files I had this problem with all happened to have their executable bit set, and the application the finder wanted to use was Terminal. Turning off the executable bit resolved the problem.