Fix file associations in mate desktop

raw

README.rst

Problem

Opening a zip file with xdg-open opens less of the file contents in mate-terminal:

$ xdg-open file.zip

This crashes mate-terminal; see http://p.cweiske.de/177

Fix

File associations in xdg-open are loaded from the following locations:

  • ~/.local/share/applications/mimeapps.list
  • /usr/share/mate/applications/defaults.list
  • /usr/share/applications/defaults.list

It found the last file only and found file-roller.desktop in it for the zip file:

application/zip=file-roller.desktop

Then it looked for file-roller.desktop in multiple directories, including ~/.local/share/applications/file-roller.desktop. Mate uses engrampa as archive management tool, so I symlinked that one:

$ cd .local/share/applications/
$ ln -s /usr/share/applications/engrampa.desktop file-roller.desktop

This fixes all file-roller associations in defaults.list, which are about 20.

Reported at https://github.com/mate-desktop/mate-menus/issues/28

Christian Weiske Christian Weiske
owner

History