Is it possible somehow modify results of default search bar in Gnome 3? I'm currently having a little problem with launching calculator app. I always pressed Super and typed "calc" and enter. But after I installed Libre Office it launches Libre Office Calc instead of Calculator. I've tried adding Calculator into favourites but it doesn't seem that it gives any kind of priority in search results. Is there some simple solution to this?

searching for calculator

  • 2
    The search result order is based on "most or recently used apps" so if you launch Calculator a few times it will then be displayed before LO Calc. No idea if/how you could hack this... Mar 23 '15 at 23:30
  • I've tried launching Calculator a lot of times. Unfortunatelly nothing changed :/ I used LO Calc just a few times but I'm using Calculator often. Are you sure that it's based on "most or recently used apps"?
    – sczdavos
    Mar 24 '15 at 16:51
  • Okay :) Thanks for your answer I appreciate it :)
    – sczdavos
    Mar 24 '15 at 18:01

You can write a search provider — see this documentation. But that won't change the application search. The default search is built-in, and it orders applications by frequency, which, from this source file, we can see is stored in ~/.local/share/gnome-shell/application_state. From the source, the algorithm is:

/* The ranking algorithm we use is: every time an app score reaches SCORE_MAX,
* divide all scores by 2. Scores are raised by 1 unit every SAVE_APPS_TIMEOUT
* seconds. This mechanism allows the list to update relatively fast when
* a new app is used intensively.
* To keep the list clean, and avoid being Big Brother, apps that have not been
* seen for a week and whose score is below SCORE_MIN are removed.

So, keep using calc and it should rise to the top. However, note that it's counting usage time, not number of executions, which probably explains why LibreOffice Calc is getting greater weight. And sitting in the background won't work — the app needs to be focused. This might be a RFE for the GNOME developers, since it seems reasonable that something you run frequently but for only a very short time should also rise to the top.

Alternatively, you could edit the file (probably while gnome-shell is not running — log in remotely or from a virtual terminal) and inflate the score manually. It will collapse again, though, so I guess if you really want to force it, you might want to automate that hack with cron or something.

Oh! It also looks like if you go to the GNOME Shell Privacy settings and turn off "Usage & History", data in this file will still be reported but no longer updated. Haven't tried that, but this may be a way to force results permanently.


I edited the .desktop files for gnome-calculator.destop and libreoffice-calc.desktop.

I renamed Gnome Calculator "Calc" in the desktop file and added "calc" to the keyword.

Then, I remove any variation on "calc" from Libreoffice Calc that didn't involve the icon or executable, substituting "Sheets" or "Spreadsheets" into the name and keyword areas.

What you end up with is a calculator named "Calc", that's the only result when you search for calc. And to start Libreoffice Calc, you now type "sheets" or "spreadsheet".



As I don't use libre office calc very often, I deleted the shortcut that let enabled gnome-desktop to locate the app.

sudo rm /usr/share/applications/libreoffice-calc.desktop

Whenever I need to open a fresh spreadsheet, I just open LibreOffice instead and select "spreadsheet" from that menu.

While not being the best answer, it still leads to the desired results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.