<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="mime-types-application" xml:lang="ca">

  <info>
    <link type="guide" xref="software#management"/>
    <link type="seealso" xref="mime-types-application-user"/>
    <link type="seealso" xref="mime-types-custom-user"/>
    <link type="seealso" xref="mime-types-custom"/>
    <revision pkgversion="3.30" date="2019-02-08" status="review"/>

    <credit type="author copyright">
      <name>Petr Kovar</name>
      <email>pknbe@volny.cz</email>
      <years>2014</years>
    </credit>

    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>

    <desc>Customize which application opens a specific MIME type.</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Jaume Jorba</mal:name>
      <mal:email>jaume.jorba@gmail.com</mal:email>
      <mal:years>2019</mal:years>
    </mal:credit>
  </info>

    <title>Sobreescriu l'aplicació registrada per defecte per a tots els usuaris</title>
    <p>
      The <file>/usr/share/applications/mimeapps.list</file> and
      <file>/usr/share/applications/gnome-mimeapps.list</file> files
      specify which application is registered to open specific MIME types by
      default. These files are provided by the distribution.</p>

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

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

    <steps>
      <title>Sobreescriu l'aplicació registrada per defecte per a tots els usuaris</title>
      <item>
        <p>
          Consult the <file>/usr/share/applications/mimeapps.list</file>
          file to determine the MIME types for which you want to change the
          default registered application. For example, the following sample of
          the <file>mimeapps.list</file> file specifies the default
          registered application for the <code>text/html</code> and
          <code>application/xhtml+xml</code> MIME types:
        </p>
        <code>[Aplicacions per defecte]
text/html=epiphany.desktop
application/xhtml+xml=epiphany.desktop</code>
        <p>L'aplicació predeterminada (<app>Epiphany</app>) es defineix especificant el fitxer corresponent <file>.desktop</file> (<file>epiphany.desktop</file>). La localització per defecte del fitxer per a altres aplicacions’ <file>.desktop</file> es troba a <file>/usr/share/applications/</file>.</p>
      </item>
      <item>
        <p>
          Create the <file>/etc/xdg/mimeapps.list</file>
          file. In the file, specify the MIME types and their corresponding
          default registered applications:
        </p>
        <code>[Aplicació predeterminada]
text/html=<var>myapplication1.desktop</var>
application/xhtml+xml=<var>myapplication2.desktop</var>

[Associacions afegides]
text/html=<var>myapplication1.desktop</var>;
application/xhtml+xml=<var>myapplication2.desktop</var>;</code>
      <p>Estableix l’aplicació registrada per defecte per al tipus MIME <code>text/html</code> a <code>myapplication1.desktop</code>, i la predeterminada pel tipus MIME<code>application/xhtml+xml</code> a <code>myapplication2.desktop</code>.</p>
        <p>Per a què aquests paràmetres funcionin correctament, assegureu-vos que els fitxers <file>myapplication1.desktop</file> i <file>myapplication2.desktop</file> s'ubiquen a la carpeta <file>/usr/share/applications/</file>.</p>
      </item>
      <item>
        <p>Podeu utilitzar la comanda <cmd>gio mime</cmd> per verificar que l’aplicació registrada per defecte s’ha establert correctament:</p>
        <screen><output>$ </output><input>gio mime text/html</input>
L'aplicació predeterminada per “text/html”: myapplication1.desktop
Aplicacions registrades:
	myapplication1.desktop
	epiphany.desktop
Applications recomanades:
	myapplication1.desktop
	epiphany.desktop</screen>
      </item>
    </steps>
</page>
