Bug 371921 - Gnome "Open With Dialog" shows 19 Krita's and Application Menu also
Summary: Gnome "Open With Dialog" shows 19 Krita's and Application Menu also
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 3.0.1.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-31 23:52 UTC by Loren Dias
Modified: 2016-11-01 05:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
19 Open With Krita Entries in Gnome 3.22 (61.66 KB, image/png)
2016-10-31 23:52 UTC, Loren Dias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loren Dias 2016-10-31 23:52:00 UTC
Created attachment 101936 [details]
19 Open With Krita Entries in Gnome 3.22

The following desktop Launchers
/usr/share/applications/krita_tga.desktop
/usr/share/applications/krita_raw.desktop
/usr/share/applications/org.kde.krita.desktop
/usr/share/applications/krita_heightmap.desktop
/usr/share/applications/krita_bmp.desktop
/usr/share/applications/krita_jpeg.desktop
/usr/share/applications/krita_pdf.desktop
/usr/share/applications/krita_exr.desktop
/usr/share/applications/krita_csv.desktop
/usr/share/applications/krita_png.desktop
/usr/share/applications/krita_tiff.desktop
/usr/share/applications/krita_brush.desktop
/usr/share/applications/krita_ora.desktop
/usr/share/applications/krita_spriter.desktop
/usr/share/applications/krita_ppm.desktop
/usr/share/applications/krita_odg.desktop
/usr/share/applications/krita_psd.desktop
/usr/share/applications/krita_xcf.desktop

Are using "NoDisplay=true" which is different than "Hidden=true"

which is causing multiple links to show on Gnome and possibly other Linux distributions.

The fix is to either add or swap for Hidden=true

This can be fixed via Linux CLI like so until mainline gets it fixed
su
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_tga.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_raw.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/org.kde.krita.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_heightmap.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_bmp.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_jpeg.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_pdf.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_exr.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_csv.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_png.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_tiff.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_brush.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_ora.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_spriter.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_ppm.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_odg.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_psd.desktop
echo $'\r'"Hidden=true" >> /usr/share/applications/krita_xcf.desktop
Comment 1 Halla Rempt 2016-11-01 05:55:06 UTC
Please report it to Gnome; https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html says

"NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff). "

So Krita's use of it is correct. Using "Hidden" is wrong:

"Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it. Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it. "