Petr Kovar
pknbe@volny.cz 2014
Customize which application opens a specific MIME type.
Jaume Jorba
jaume.jorba@gmail.com 2019

# Sobreescriu l'aplicació registrada per defecte per a tots els usuaris

The /usr/share/applications/mimeapps.list and /usr/share/applications/gnome-mimeapps.list files specify which application is registered to open specific MIME types by default. These files are provided by the distribution.

To override the system defaults for all users on the system, you need to create a /etc/xdg/mimeapps.list or /etc/xdg/gnome-mimeapps.list file with a list of MIME types for which you want to override the default registered application.

Files located in /etc/xdg/ take precedence over files found in /usr/share/applications/. Additionally, /etc/xdg/gnome-mimeapps.list takes precedence over /etc/xdg/mimeapps.list, but can be overridden by the user's configuration in ~/.config/mimeapps.list.

# Sobreescriu l'aplicació registrada per defecte per a tots els usuaris

Consult the /usr/share/applications/mimeapps.list file to determine the MIME types for which you want to change the default registered application. For example, the following sample of the mimeapps.list file specifies the default registered application for the `text/html` and `application/xhtml+xml` MIME types:

[Aplicacions per defecte] text/html=epiphany.desktop application/xhtml+xml=epiphany.desktop

L'aplicació predeterminada (Epiphany) es defineix especificant el fitxer corresponent .desktop (epiphany.desktop). La localització per defecte del fitxer per a altres aplicacions’ .desktop es troba a /usr/share/applications/.

Create the /etc/xdg/mimeapps.list file. In the file, specify the MIME types and their corresponding default registered applications:

[Aplicació predeterminada] text/html=myapplication1.desktop application/xhtml+xml=myapplication2.desktop

[Associacions afegides] text/html=myapplication1.desktop; application/xhtml+xml=myapplication2.desktop;

Estableix l’aplicació registrada per defecte per al tipus MIME `text/html` a `myapplication1.desktop`, i la predeterminada pel tipus MIME`application/xhtml+xml` a `myapplication2.desktop`.

Per a què aquests paràmetres funcionin correctament, assegureu-vos que els fitxers myapplication1.desktop i myapplication2.desktop s'ubiquen a la carpeta /usr/share/applications/.

Podeu utilitzar la comanda gio mime per verificar que l’aplicació registrada per defecte s’ha establert correctament:

    $ gio mime text/html
    L'aplicació predeterminada per “text/html”: myapplication1.desktop
    Aplicacions registrades:
    	myapplication1.desktop
    	epiphany.desktop
    Applications recomanades:
    	myapplication1.desktop
    	epiphany.desktop