ulauncher-file-search icon indicating copy to clipboard operation
ulauncher-file-search copied to clipboard

fd dependency checks

Open arigit opened this issue 5 years ago • 18 comments

Ubuntu average user here. I found the extension in the ulauncher site.

It took me a while to realize that there was a dependency with 'fd', there was no message about this in the ulauncher extension site.

Suggestion #1: if the extension can't find a "proper" fd in the path, can a message be displayed in the ulauncher results, asking to install the package.

And then: in ubuntu, typing "fd" in the command line, bash suggests to install the package "fdclone", which provides fd, however this fd is totally unrelated to finding files. It took me another 10 minutes to figure this out.

What needed to be installed was the package "fd-find" and then, on top of that, a symbolic link is needed because debian changed the executable name to "fdfind" instead of fd. Another 10 minutes to figure this out.

Suggestion #2: please support both binary names: fd or fdfind, whatever is in the path and works

For ubuntu, Suggestion #1 could ask for installation of the "fd-find" package and Suggestion #2 could default to "fdfind" as the name of the binary

Or: just add a configuration option for the binary name and include there the explanations of what package need to be installed

arigit avatar Aug 16 '19 23:08 arigit

to chime in here. I'm on MX Linux 19 (Debian). I set alias alias fd=fdfind in bashrc. fd works fine in the cli but not with ulauncher.

thob avatar Jan 12 '20 14:01 thob

Same issue here on Pop!_OS 19.10. I tried setting alias fd=fdfind in bashrc as well without any result in Ulauncher.

cspipaon avatar Mar 19 '20 20:03 cspipaon

For @thob and @cspipaon, what you need is more than aliasing. Try sudo ln -s /usr/bin/fdfind /usr/bin/fd .

liuhaowen478 avatar May 21 '20 23:05 liuhaowen478

hmm, I had it working on Ubuntu 18.04. Then it stopped all of a sudden. I got fd and it works on the CLI but for some reason stopped working in Ulauncher

thob avatar Jun 02 '20 17:06 thob

It would be helpful it you elaborate on "stopped working."

lunacd avatar Jun 02 '20 17:06 lunacd

it doesn't find anything, shows 'loading'

thob avatar Jun 02 '20 17:06 thob

If it worked before and it stopped working, it is most probably because of my patch. But this is indeed weird. You are using Ubuntu so I'm assuming you had both fd and fdfind working in CLI?

lunacd avatar Jun 02 '20 17:06 lunacd

fd yes, fdfind I don't have

thob avatar Jun 02 '20 18:06 thob

Well I cannot reproduce this issue. On my machine (Ubuntu 20.04), it worked with either fd or fdfind or both. Can you fire up your python3 and try:

import subprocess
subprocess.check_call(['fd'])

(That is how my patch checks for fd)

lunacd avatar Jun 02 '20 18:06 lunacd

this works

thob avatar Jun 02 '20 18:06 thob

This is getting weird and I'm running out of hypothesis. Could you remove and reinstall the plugin?

lunacd avatar Jun 02 '20 18:06 lunacd

I did that before

thob avatar Jun 02 '20 18:06 thob

I'm not familiar with python so I really don't see how can something work interactively but not in a script. As a last resort, can you just create a link fdfind to fd and try again?

lunacd avatar Jun 02 '20 18:06 lunacd

you mean sudo ln -s /usr/bin/fdfind /usr/bin/fd

thob avatar Jun 02 '20 18:06 thob

I get ln: failed to create symbolic link '/usr/bin/fd': File exists

thob avatar Jun 02 '20 18:06 thob

Oh you would flip it, you are creating the missing fdfind.

lunacd avatar Jun 02 '20 18:06 lunacd

hmm, I don't have fdfind

thob avatar Jun 02 '20 18:06 thob

Yes and you are creating it. Read the man page for ln. The second parameter is the link you are creating. That is what I meant by "flip it".

lunacd avatar Jun 02 '20 19:06 lunacd