Fix file associations in mate desktop

revision 46337d44a05e8c81518e45aad0d2e4d4ce0e911f

raw

mate-xdg-open-file-associations.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.

History