There is frequently more than one application able to handle data of a certain type, so users and even some packages assemble lists of default applications for each #MIME type. While the base install of Arch Linux does not define default applications, desktop environments you install may do so. Some desktop environments also provide a GUI or a file-manager which can interactively configure default applications. If you do not use a desktop environment, you may need to install additional software in order to conveniently manage default applications.
The configuration of default applications depends on which launcher is used. Unfortunately there are multiple incompatible standards and many programs even have their own custom formats.
The most common standards are explained below for manual editing. There are also several #Utilities which can do the job, which may or may not implement the following standards.
Before setting the default application per file type, the file type must be detected. There are two common ways that this detection is done:
- using the file name extension e.g. .html or .jpeg
- using a magic number in the first few bytes of the file
However it is possible that a single file type is identified by several different magic numbers and file name extensions, therefore MIME types are used to represent distinct file types. MIME types are specified by two parts separated by a slash:
type/subtype. The type describes the general category of the content, while the subtype identifies the specific data type. For example,
image/jpeg is the MIME type for JPEG images, while
video/H264 is the MIME type for H.264 video.
Technically, every MIME type should be registered with the IANA, however many applications use unofficial MIME types; these often have a type starting with
x-, for example
x-scheme-handler/https for a HTTPS URL. For local use, the XDG MIME Applications#Shared MIME database can be used by other packages to register new MIME types.
/etc/mailcap that uses for the most common MIME types.
xdg-opento delegate to it. This will cause an infinite loop if you configured your
mailcapas described above.