Bug 420431 - Invalid MimeType "*/*" in `org.kde.kdeconnect_open.desktop`
Summary: Invalid MimeType "*/*" in `org.kde.kdeconnect_open.desktop`
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 20:12 UTC by orctarorga
Modified: 2021-04-14 13:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description orctarorga 2020-04-22 20:12:05 UTC
In the desktop file `org.kde.kdeconnect_open.desktop`, the `MimeType` is
`*/*`. 

`update-desktop-database` is a tool provided in `desktop-file-utils` that 

> updates the database containing a cache of MIME types handled by desktop files

When running `update-desktop-database`, it throws an error saying that 

> "*/*" is an invalid MIME type ("*" is an unregistered media type)

This is reported in [Clear Linux](https://github.com/clearlinux/distribution/issues/1906) and [Arch Linux](https://bugs.archlinux.org/task/65865)

STEPS TO REPRODUCE
1. Run `update-desktop-database`

OBSERVED RESULT
> "*/*" is an invalid MIME type ("*" is an unregistered media type)
Comment 1 Kai Uwe Broulik 2020-04-23 06:57:42 UTC
Is that probably what the "all/allfiles" type is for?
Comment 2 Saikat Patra 2020-04-23 15:12:51 UTC
I can reproduce this in v1.4, might be present in later versions too. 

*/* is not a valid mime type. If I assume this mime type is supposed to include all files, the valid mime type for that is application/octet-stream.

Modifying /usr/share/applications/org.kde.kdeconnect_open.desktop to reflect the same fixes the issue.
Comment 3 Rex Dieter 2020-04-24 15:05:03 UTC
there's multiple validation errors with this .desktop file, MimeType is one:

$ desktop-file-validate kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop | grep error:
kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop: error: (will be fatal in the future): value "*/*;" for key "MimeType" in group "Desktop Entry" contains value "*/*" which is an invalid MIME type: "*" is an unregistered media type
kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop: error: key "MimeType" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"
kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop: error: key "Exec" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"
kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop: error: key "Terminal" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"
kdeconnect-kde-20.04.0/data/org.kde.kdeconnect_open.desktop: error: key "Categories" is present in group "Desktop Entry", but the type is "Service" while this key is only valid for type "Application"
Comment 4 phrxmd 2020-06-14 10:04:30 UTC
You can fix this by changing */* to application/octet-stream as suggested by Saikat Patra.

There are patches to this end for a number of distributions all over the internet, like here: https://github.com/void-linux/void-packages/commit/17060bfa012b12896d3d7ec502caa154af6135b4, but it's an upstream issue.