<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>Fix file associations in mate desktop</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/178 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="178"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;div class="section" id="problem"&gt;
&lt;h1&gt;Problem&lt;/h1&gt;
&lt;p&gt;Opening a zip file with &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;xdg-open&lt;/span&gt;&lt;/tt&gt; opens &lt;tt class="docutils literal"&gt;less&lt;/tt&gt; of the file contents in &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;mate-terminal&lt;/span&gt;&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ xdg-open file.zip
&lt;/pre&gt;
&lt;p&gt;This crashes mate-terminal; see &lt;a class="reference external" href="http://p.cweiske.de/177"&gt;http://p.cweiske.de/177&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="fix"&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;p&gt;File associations in &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;xdg-open&lt;/span&gt;&lt;/tt&gt; are loaded from the following locations:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;~/.local/share/applications/mimeapps.list&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;/usr/share/mate/applications/defaults.list&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;/usr/share/applications/defaults.list&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It found the last file only and found &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;file-roller.desktop&lt;/span&gt;&lt;/tt&gt; in it for the zip file:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
application/zip=file-roller.desktop
&lt;/pre&gt;
&lt;p&gt;Then it looked for &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;file-roller.desktop&lt;/span&gt;&lt;/tt&gt; in multiple directories, including
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;~/.local/share/applications/file-roller.desktop&lt;/span&gt;&lt;/tt&gt;.
Mate uses &lt;tt class="docutils literal"&gt;engrampa&lt;/tt&gt; as archive management tool, so I symlinked that one:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ cd .local/share/applications/
$ ln -s /usr/share/applications/engrampa.desktop file-roller.desktop
&lt;/pre&gt;
&lt;p&gt;This fixes all file-roller associations in &lt;tt class="docutils literal"&gt;defaults.list&lt;/tt&gt;, which are about 20.&lt;/p&gt;
&lt;p&gt;Reported at &lt;a class="reference external" href="https://github.com/mate-desktop/mate-menus/issues/28"&gt;https://github.com/mate-desktop/mate-menus/issues/28&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/178/rev-raw/7d1829ba028b2a5dbe872372c69392edbcf11d1b/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/178#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
