MIME types are invalid in Linux AppImage
Reported version
3.x-dev
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
MIME types are installed as:
- MSCZ: application/x-musescore-portable
- MSCX: application/x-musescore-portable+xml
- MXL: application/vnd.recordare.musicxml-portable
- MusicXML: application/vnd.recordare.musicxml-portable+xml
Notice the "-portable" suffix. This should not be there.
The correct MIME types are:
- MSCZ: application/x-musescore
- MSCX: application/x-musescore+xml
- MXL: application/vnd.recordare.musicxml
- MusicXML: application/vnd.recordare.musicxml+xml
To verify the above, first install the AppImage using the relevant command line option:
./MuseScore*.AppImage install
Then, right-click on any MSCX, MSCZ, MXL or MusicXML score in the File Manage (e.g. Nautilus / GNOME Files) and click Properties to see the MIME type.
Fix version
3.5.0
Comments
May stem from "
@MSCORE_INSTALL_SUFFIX@
" in .../build/Linux+BSD/musescore.xml.in ?see https://github.com/musescore/MuseScore/pull/5590
Background
The "-portable" suffix was being appended to avoid conflicts when multiple versions of MuseScore are installed simultaneously. This isn't a problem for MIME types per se, but it is a problem for the icon files, which by default have the same name as the MIME type they represent.
If multiple versions of MuseScore are installed then both will provide a file called "application-x-musescore.svg". Removing either copy of MuseScore will delete that file for BOTH versions, so it was necessary to add a suffix to icon filenames to avoid this.
However, that meant changing the MIME type too, hence the bug.
Solution
The PR manually specifies icon names rather than relying on default names based on the MIME type. This breaks the link between icon filenames and MIME types, so now a suffix can be appended to an icon filename without having to append it to the MIME type it represents.
Fixed in branch master, commit 3c1635591d
_fix #299351: MIME types are invalid in Linux AppImage
MIME types are used to setup file associations (i.e. tell the File Manager
which files MuseScore can open) and to provide icons for those files.
Primary changes:
Remove MSCORE_INSTALL_SUFFIX from MIME types to ensure they are valid.
Manually specify icon names so they no longer have to match the MIME type.
Icon names retain MSCORE_INSTALL_SUFFIX to ensure there are no conflicts
when the user has multiple copies of MuseScore installed simultaneously.
Additional changes:
Improve formatting (indent 4 spaces instead of 2).
Create MIME types for MuseScore Drumsets (.drm), Palettes (.mpal) and
Styles (.mss).
Add types for import formats, including Guitar Pro and Overture.
Add MIDI and new import types to .desktop file so MuseScore will appear in
the File Manager's "Open with..." list for these types of file._
Fixed in branch master, commit 4419866a31
_Merge pull request #5590 from shoogle/mimetypes
fix #299351: MIME types are invalid in Linux AppImage_
Automatically closed -- issue fixed for 2 weeks with no activity.