Si fent el que la captura suggereix (apart de la pertinent associació 'tipus d'arxiu/app' que es fa amb el menú contextual) no conseguim que el tipus d'arxiu en qüestió sigui obert per defecte per la app desitjada podria ser que el sistema analitzi les capçaleres de l'arxiu i l'obri segons aquestes capçaleres, ignorant l'app que nosaltres volem. Per evitar que el sistema fagi aquest anàlisi:
Utilitzarem l'exemple dels arxius TPL que jo volia que s'obrissin com a arxius de text i no com a HTML.
1. Obrir l'arxiu
/usr/share/mime/packages/freedesktop.org.xml
2. Buscar el tipus d'arxiu que diu que es TPL, Documento HTML i Documento XML
3. Borrar tot el contingut de "magic":
<magic priority="50">
<match value="<!DOCTYPE HTML" type="string" offset="0:256"/>
<match value="<!doctype html" type="string" offset="0:256"/>
<match value="<HEAD" type="string" offset="0:256"/>
<match value="<head" type="string" offset="0:256"/>
<match value="<TITLE" type="string" offset="0:256"/>
<match value="<title" type="string" offset="0:256"/>
<match value="<HTML" type="string" offset="0:256"/>
<match value="<html" type="string" offset="0:256"/>
<match value="<SCRIPT" type="string" offset="0:256"/>
<match value="<script" type="string" offset="0:256"/>
<match value="<BODY" type="string" offset="0"/>
<match value="<body" type="string" offset="0"/>
<match value="<!--" type="string" offset="0"/>
<match value="<h1" type="string" offset="0"/>
<match value="<H1" type="string" offset="0"/>
<match value="<!doctype HTML" type="string" offset="0"/>
<match value="<!DOCTYPE html" type="string" offset="0"/>
</magic>
i
<magic priority="40">
<match value="<?xml" type="string" offset="0"/>
<match value="<!--" type="string" offset="0"/>
</magic>
4. Actualitzar-ho amb:
sudo update-mime-database /usr/share/mime
5. Ara el TPL no hauria de tenir cap associacio si no l'hi hem fet previament i ja podem assignar-li l'associació que vulguem.