

- #Change default application for a file type in mac how to#
- #Change default application for a file type in mac update#
- #Change default application for a file type in mac password#
Upon selecting an application, the system will initially just store the application association in an extended attribute for the file and not update the central launch services database (keep this in mind for later) however, if you get information on the file and click the "Change All." button in the "Open With" section of the document, then the launch services will be updated to associate that file type with the selected application.
#Change default application for a file type in mac how to#
While you can run the "lsregister" command in this manner for each application on the system, you can also supply the command with the "-seed" flag as shown below, which will tell the system to scan common areas where applications are stored (e.g., the /Applications or /username/Applications folders), and register any that are found in these areas:Īgain, the system should automatically do this so running these commands manually is not necessary however, understanding that the system registers applications individually like this helps in tackling a limitation of the file-handling in OS X, which is how one might clear a custom file association with applications in OS X, which may be manually set for file types that the system cannot recognize.įor instance, if you have a file called "test.asdf," then the system will likely not know how to handle the "asdf" file type and will prompt you to select an application with which to open it. When the lsregister command is run, it scans through all applications and adds them to the launch services database. The command should take a moment or two to complete, after which the `locate lsregister` shortcut should work.
#Change default application for a file type in mac password#
In this case, run the command "sudo /usr/libexec/locate.updatedb" in the Terminal and provide your password when prompted. If this shortcut does not work, then it is likely that the system's "locate" database is not properly built. Note: The "lsregister" command itself is buried deep in an application framework, so instead of typing the very long path to the command in the Terminal, we can use the `locate lsregister` notation as a shortcut. `locate lsregister` /Applications/Appname.app While done automatically by the system, you can manually do this by using the "lsregister" Terminal command.įor instance, to register a program called Appname with the launch services, you can run the following command in the Terminal: When an application is launched for the first time, the system scans its file-handling abilities and stores them in this database so the application can then be used to quickly open documents it was built to handle.

The resource that OS X uses to associate file types (e.g., TXT and PDF) or protocols (e.g., HTTP or FTP) with applications that can handle them is the launch services database.

While OS X provides options to change the programs associated with documents, there is no option to clear all application associations for a file type. When you open a document or click a link in OS X, the system launches a program that can read it.
