Created attachment 109900 [details]
Two copies of the same app, each one from a different source
See attached screenshot. I used Discover to install one copy of gedit from KDE Neon's packaging, and another from Flathub. Kickoff doesn't offer any distinction between the two, so it just looks weird and confusing, and I can't tell which version is going to open when I click on one of the two entries.
Perhaps we could mark each with its version and source to help differentiate them, e.g:
- gedit 3.18 (KDE Neon)
- gedit 3.26 (Flathub)
(In reply to Nate Graham from comment #0)
This is rather not related to plasmashell, but to packages developers. Name as we can see in Kickoff is in *.desktop file. If in both (from repository and from flatpak) is the same, we can see only the same name (i.e. gedit).
In this particular case, I would recommend that append some more information to the display beyond what the desktop file provides. It's not reasonable to ask packagers to do this, because the information about what source a package comes from is irrelevant in the common case that there's only one app installed. It's only once you have the same app installed from multiple sources that you actually start caring about which one is which.
So apparently with Flatpak at least, you can add something like this to your Flatpak recipe:
"desktop-file-name-prefix": "(Beta) ",
The version of Krita from the kdeapps Flatpak repo incudes a "(Nightly) " prefix, so if you installed Krita from Flathub and the kdeapps, everything would work fine because there would be two menu items like this:
- (Nightly) Krita
This only works with Flatpak though. If you installed Krita from Flathub, and also from your distro, neither one will add a prefix to the name, so you'd end up with two menu items like this:
And you wouldn't be able to tell which one will run when you click on it.
There's a cross desktop specification for how menus are made.
Nothing about adding a suffix to a directory unfortunately.
We generate the menu from the xml menu in kservice code.
I'm not convinced there's much we can do too much on the Plasma side.
Perhaps we should brainstorm a workable approach then, because this is going to come up more and more as Flatpak and Snap become more widely used by normal users.
There can be detection for various apps installation methods with appending small overlay icons on the bottom right side for particular apps in the menu - like for apps installed with Flatpak, Snap, AppImage, Wine, from sources, AUR, etc. - with different icon for each source or with single icon for all apps that are installed from non-system repos
FYI this issue was mentioned in http://www.ocsmag.com/2018/02/16/plasma-the-road-to-perfection-is-paved-with-bugs/
Overlay icons would be good, especially if we add those to Discover, too, so users can learn to recognize them.
I think also adding the version number would be good, since that's the key difference between them, and the only reason to install multiple versions of the same app in the first place.
So the menu would show the following:
[VLC icon badged with the distro package] VLC (2.8.1)
[VLC icon badged with the Flathub logo] VLC (3.0)
The problem is broader than just showing which application comes from where. There should also a heuristic to determine which version should be used to open documents, and an easy way for the user to override it.
Some thoughts on this are contained in the broader problem description at
(In reply to Nate Graham from comment #5)
> Perhaps we should brainstorm a workable approach then, because this is going
> to come up more and more as Flatpak and Snap become more widely used by
> normal users.
Did some brainstorming already take place, yet? I think it is a problem, which is more important than ever. When I want to test different versions of software (through standard repo, Flatpak or Snap) then I need to be able to differentiate them easily. (To find out, if some bug has been fixed in the newer flatpak version, for example.)
Linux Mint partially fixed the problem some time ago in the Cinnamon menu and mentioned it on their blog: https://blog.linuxmint.com/?p=3766
*** Bug 412641 has been marked as a duplicate of this bug. ***
*** Bug 390828 has been marked as a duplicate of this bug. ***
Unfortunately this isn't possible with the current version of the desktop file spec, which assumes that only one version of an app will be installed. When an app has multiple desktop files, there is a preference hierarchy with the highest level one (e.g. in your home folder) overriding lower level ones. The spec would need to be changed before this can be done.