site  contact  subhomenews

Syntax fix for mimeapps.list

November 07, 2024 — BarryK

/usr/share/applications/mimeapps.list is used by many applications to determine what executable to handle a particular file, for example how to open or view a PNG image. This list is generated by /usr/bin/build-rox-sendto everytime a package is installed or removed, or the SFS layers change.

Easy Scarthgap 6.4.2 has UExtract, a universal archive extractor tool. However, a problem emerged, as discussed on the forum:

https://forum.puppylinux.com/viewtopic.php?p=134984#p134984

I took out "inode/directory" and "inode/mount-point" from the "MimeType=" field in /usr/share/applications/uextract.desktop, which fixed the problem reported by bugnaw333; however, there was another problem, being that the mimeapps.list file had the wrong format.

https://github.com/bkauler/woofq/commit/8836d9758e8006ba9fe1e4117c207e211cc99199

That fixes the syntax, but doesn't automatically set a default. For example, this line in mimeapps.list:

application/pdf=uextract.desktop;evince.desktop;gimp.desktop;inkscape.desktop

...will set the first one, uextract.desktop, as the default.

ROX-Filer has it's own right-click menu mechanism and will offer a choice, but I don't know about apps that read mimeapps.list; maybe they will just use the leftmost entry instead of offering a choice. I haven't tried with KDE Dolphin for example.

Note, the correct syntax for mimeapps.list is defined here.  

Tags: easy