Bug 407255 - Problems with the application search
Summary: Problems with the application search
Status: RESOLVED DUPLICATE of bug 399832
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-05 22:19 UTC by Jacob Emery
Modified: 2020-10-13 21:21 UTC (History)
2 users (show)

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


Attachments
wolfram-mathematica11.desktop (626 bytes, text/plain)
2019-05-12 22:03 UTC, Jacob Emery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Emery 2019-05-05 22:19:17 UTC
SUMMARY


STEPS TO REPRODUCE
0. Find a package whose .desktop file starts differently than the package name (e.g. Mathematica 11 and wolfram-mathematica-11.desktop).
1. Open Application Dashboard (or Application Launcher / Application Menu)
2. Search for the initial letter or the two initial letters of the package name. "m" or "ma" in the case of Mathematica 11.

OBSERVED RESULT
You won't see Mathematica displayed. But if you search for "Mat" (i.e. using 3 letters or more) you will see it.
If you search for "w" or "wo" you will see Mathematica displayed.

EXPECTED RESULT
One should see the package even if the first 1 or 2 letters typed do not correspond to the first 1 or 2 letters of what comes before .desktop.
Inside the desktop file there is a name field and it should be used not only for searching 3+ letters, but also for a 1 or 2 letters search.

ADDITIONAL INFO
Even worse if what you are typing in is not an application, but a desktop session. E.g. you won't see "Lock the screen" if you type "l", "lo", "loc", but you have to type "Lock".
Similarly "Shut down the computer" appears only if one types in "Shut down". "Logout" is shown only if one types in "logout".

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Latest available under Arch Linux
(available in About System)
KDE Plasma Version: Latest available under Arch Linux
KDE Frameworks Version: Latest available under Arch Linux
Qt Version: Latest available under Arch Linux

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-05-09 15:22:28 UTC
Does the same thing happen if you search for it using KRunner, which can be called up via the alt-space keyboard shortcut?
Comment 2 Jacob Emery 2019-05-12 21:20:50 UTC
The same happens also with KRunner.
Comment 3 Nate Graham 2019-05-12 21:34:52 UTC
Thanks for the info! Can you attach the .desktop file in question? Maybe there's another string we can match on.
Comment 4 Jacob Emery 2019-05-12 22:03:29 UTC
Created attachment 120025 [details]
wolfram-mathematica11.desktop
Comment 5 Jacob Emery 2019-05-12 22:04:19 UTC
I added the .desktop file as an attachment.

The same behaviour can also be found e.g. with "GNU Octave" (whose .desktop is org.octave.Octave.desktop on Arch Linux) or with "Neovim" (whose .desktop file is nvim.desktop on Arch Linux. In this case "n" will show Neovim because nvim.desktop starts with "n", but "ne" won't display it as a result and "nv" will display it).
Comment 6 Jacob Emery 2019-05-12 22:13:09 UTC
I don't understand why the following happens:

If I search for "o" then "GNU Octave" will be displayed.
If I search for "oc" then "GNU Octave" won't be displayed.
If I search for "or" then "GNU Octave" won't be displayed, but the .desktop file starts with "or" (org.octave.Octave.desktop).
If I search for "oct" then "GNU Octave" will be displayed.
Comment 7 Nate Graham 2019-05-12 22:24:34 UTC
Very odd indeed. Either way, like you I would expect KRunner to match on the first letter rather than using a three-character minimum.

I think this may be intentional (whether or not it's optimal is another story!); Kai, can you maybe shed some light on the history of this behavior?
Comment 8 Jacob Emery 2019-06-03 12:57:55 UTC
Any update about this bug?
Comment 9 Alexander Lohnau 2020-10-13 21:21:34 UTC

*** This bug has been marked as a duplicate of bug 399832 ***