Ulauncher search doesn't work (for the first 5 minutes)

Created on 17 May 2017  路  16Comments  路  Source: Ulauncher/Ulauncher

Steps to reproduce:

  1. start Ulauncher (either via terminal, dash or autostart);
  2. use the hotkey and type anything that is not a shortcut.

Expected behaviour: Ulauncher shows the programs matching the written string.
Actual behaviour: the only matched items are the default shortcuts.

Notes: Ulauncher actually start to work ~5 minutes after the startup. From that point on, closing and re-opening the app will still result in a fully-functioning Ulauncher.

Ulauncher version: 2.2.0.r1
Linux distro: Ubuntu 17.04
Desktop environment: Unity 7

Logs:
https://gist.github.com/NetBender/5789068673a37fd78028522f59fd14b5#file-ulauncher_search_issue-txt
I purposefully let the log go until Ulauncher started showing the program i was looking for (Geany).

bug

Most helpful comment

Thanks for reporting.

This will be addressed soon

All 16 comments

Thanks for reporting.

This will be addressed soon

Hello,
I am having the same issue.
I am using v2.2.1.r0 and Ubuntu 17.04 with Gnome Shell 3.24.1.
I have also tried with Dev Version 3.0.2, the issue is still the same.
After lets say 5 minutes, Ulauncher starts working normally.

@gohv it probably is indexing unnecessary desktop dirs.
Could you provide log (ulauncher -v) so I can add those dirs to blacklist?

@gornostal Hey,
Thank for the reply!
Is this what you need?

/usr/lib/python2.7/dist-packages/ulauncher/ext/notification.py:1: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
  from gi.repository import Notify
/usr/lib/python2.7/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py:5: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gio, Gtk, WebKit2
2017-06-11 10:09:55,520:DEBUG:ulauncher: set_up_logging() 'logging enabled'
2017-06-11 10:09:55,520:INFO:ulauncher: main() 'Ulauncher version 2.2.1.r0'
2017-06-11 10:09:55,520:INFO:ulauncher: main() 'GTK+ 3.22.11'
2017-06-11 10:09:55,521:DEBUG:ulauncher: main() 'Getting the existing instance...'

Ah.. you had ulauncher running.
Could you stop the app and then run with command ulauncher -v
Log will be available in ~/.cache/ulauncher_cache/lasst.log

Hello,
Sorry for the delay,
https://pastebin.com/xQr3yYXx
My setup is messy, so let me know if this is causing the issue.

Looks like /usr/share/kservices5/ should be blacklisted.
Will be done with the next release

Should also blacklist /usr/share/fk5 as well as /user/share/kservicetypes5.

Should also blacklist user Trash directory.

Hey :) I have the same problem. ULauncher only shows the pre-programmed shortcuts for a while and then displays the programs found in the standard locations.

I partially solved the problem by configuring a shortcut as such (See image). This way, if when I type slack nothing is found, I just prepend run to run the command.

I know it's not really a fix to that particular problem, but at least it offers a solid workaround so you can start using the computer and issue commands right away.

image

Hi, I am having this issue as well. While you guys work for a permanent fix in the next version, is there anything the users can do as a temporary workaround?

Love the Ulauncher otherwise, thanks :)

As a temporary workaround you could find ulauncher/utils/desktop/__init__.py somewhere in your system and add more directories to blacklisted list.

In the next version I'm blacklisting the following dirs by default:

    '/usr/share/locale',
    '/usr/share/app-install',
    '/usr/share/kservices5',
    '/usr/share/fk5',
    '/usr/share/kservicetypes5',
    '/usr/share/kde4',
    '/usr/share/mimelnk'

If you close the app and run it from console as ulauncher -v, you'll most likely see lot's of constructor cannot be NULL errors that follow .desktop file that cannot be parsed. You can blacklist dir with those files.

I'm actually planning to release v3.1.0 (Dev) later this week. I'm hopping this issue won't be noticeable there.

@gornostal Are you the maintainer of ULauncher? How about this: whenever a crawling cycle completes, serialize the results into ~/cache/whatever.db.

Then at startup:

  • Start crawling cycle like it is started right now.
  • In parallel, check for ~/.cache/ulauncher/whatever.db.
  • If it exists, deserialize the data and make it available immediatelly.
  • Regardless of whether a cache file was restored upon startup, just completelly overwrite it with the results of the crawling cycle.

I noticed the usage of ~/.cache/ulauncher_cache so I'm guessing it's not a big deal to implement.

@hickscorp I like your idea with caching apps. I also was thinking to do that some time ago.
I'll plan this improvement for the next release.
Created a separate ticket #154

In v3.1.1 there is a new preference option that allows you to blacklist unwanted desktop dirs.
I've also added several items to the blacklist by default, so this issue should be resolved.

https://ulauncher.io/#Download

Was this page helpful?
0 / 5 - 0 ratings