GNOME Bugzilla – Bug 725023
Can no longer find apps by executable/desktop file name
Last modified: 2018-06-13 14:58:41 UTC
I'm used to type "nautilus" or "totem" to start the apps which nowdays show as "Files" or "Videos". This used to work in 3.10. It no longer works in 3.11. Was it removed on purpose? if so, what is the reasoning for this removal?
The implementation moved to glib, which doesn't match on executable name - reassigning.
Ryan is supposedly working on this.
Created attachment 270700 [details] [review] desktopappinfo: add Exec to searchable keys Add the basename from the first component of the Exec line to the list of strings to search for via g_desktop_app_info_search(). We treat Exec as a fairly strong match -- just below the visible name. Add a testcase to make sure everything is working OK.
No match on desktop file ID because it is assumed that people will be moving to reverse-dns style names... I think Exec is the one that most people cared about in any case.
I'm wonder what happen if I have something like this: Exec=env LANG=c monodevelop %F (I have something like this in some desktop apps without support for RTL).
OK, I checked this with nautilus. If I added 'env LANG=C' I can to find nautilus in the search result of 'env' but not 'nautilus'.
Another similar situation: Exec=python /path/to/actualprogram We discussed this and decided that we don't really want to try to sort out these cases. It's just too hard to get right.
Why not do a partial match on the field?
To take the name of the desktop file sound simple (generic name?)?
Review of attachment 270700 [details] [review]: Looks good to me ::: gio/tests/desktop-app-info.c @@ +662,3 @@ + + /* make sure we only search the first component */ + assert_search ("nonsearchable", "", TRUE, FALSE, NULL, NULL); Would be nice to also have a testcase that exercises the path-stripping
(In reply to comment #10) > Would be nice to also have a testcase that exercises the path-stripping I considered this but I was afraid to hardcode a path to 'false' in either /bin or /usr/bin because if we guess the wrong one that GDesktopAppInfo will reject it entirely. Maybe I should just use /usr/bin/env... it is widely known to always be at that location.
Attachment 270700 [details] pushed as 5d5ea49 - desktopappinfo: add Exec to searchable keys
*** Bug 712604 has been marked as a duplicate of this bug. ***
(In reply to Yosef Or Boczko from comment #5) > I'm wonder what happen if I have something like this: > Exec=env LANG=c monodevelop %F > > (I have something like this in some desktop apps without > support for RTL). (In reply to Yosef Or Boczko from comment #6) > OK, I checked this with nautilus. > If I added 'env LANG=C' I can to find nautilus > in the search result of 'env' but not 'nautilus'. (In reply to Allison (desrt) from comment #7) > Another similar situation: > > Exec=python /path/to/actualprogram > > We discussed this and decided that we don't really want to try to sort out > these cases. It's just too hard to get right. While playing with Fedora Silverblue, I found myself digging through GDesktopAppinfo, and found that this was recently addressed in bug 795488
(In reply to Debarshi Ray from comment #14) > (In reply to Allison (desrt) from comment #7) > > Another similar situation: > > > > Exec=python /path/to/actualprogram > > > > We discussed this and decided that we don't really want to try to sort out > > these cases. It's just too hard to get right. > > While playing with Fedora Silverblue, I found myself digging through > GDesktopAppinfo, and found that this was recently addressed in bug 795488 Well, it depends on how you look at it - searching for "python" will no longer return "random" matches, but you still cannot search for "actualprogram" ...
(In reply to Florian Müllner from comment #15) > (In reply to Debarshi Ray from comment #14) > > (In reply to Allison (desrt) from comment #7) > > > Another similar situation: > > > > > > Exec=python /path/to/actualprogram > > > > > > We discussed this and decided that we don't really want to try to sort out > > > these cases. It's just too hard to get right. > > > > While playing with Fedora Silverblue, I found myself digging through > > GDesktopAppinfo, and found that this was recently addressed in bug 795488 > > Well, it depends on how you look at it - searching for "python" will no > longer return "random" matches, but you still cannot search for > "actualprogram" ... Yes, that's why I started digging in the first place. I saw that typing "epiphany" wouldn't get me a hit in gnome-shell; then I saw that typing "flatpak" shows me everything. When I saw the code I realized that you had addressed the second problem. :) I filed https://gitlab.gnome.org/GNOME/glib/issues/1417 for the original problem of not being to search using the executable name.