Frewacom / pywalfox

Dynamic theming of Firefox (and Thunderbird) using your Pywal colors
https://addons.mozilla.org/en-US/firefox/addon/pywalfox/
Mozilla Public License 2.0
583 stars 12 forks source link

Pywalfox: command not found #30

Closed samueltwallace closed 4 years ago

samueltwallace commented 4 years ago

The firefox console tells me that the native app can't find pywalfox:

stderr output from native app pywalfox: /home/samueltwallace/.local/lib/python3.8/site-packages/pywalfox/bin/main.sh: line 3: pywalfox: command not found

yet in a terminal, I can use pywalfox just fine! pywalfox -h does what it is supposed to do. I think this may be a python/pip versioning problem, but not totally sure. Even if I run the main.sh script in a terminal, I don't get the error.

Frewacom commented 4 years ago

I am not sure why this is happening. Since you can run the pywalfox executable in your terminal it should be in your PATH, but for some reason Firefox can not seem to find it.

samueltwallace commented 4 years ago

So I uninstalled everything and went to try again. I noticed that my pywalfox was installed in my anaconda installation of python, which is probably why it wasn't found. So I just need to deactivate python, install pywalfox to my /usr/bin/python, then try again?

Frewacom commented 4 years ago

Yes, that should probably fix it.

samueltwallace commented 4 years ago

Not working yet. Still have the same error message.

which pywalfox returns /home/samueltwallace/.local/bin/pywalfox, does this look right? Just spitballing.

Frewacom commented 4 years ago

That looks right, I have the same path myself.

samueltwallace commented 4 years ago

I uninstalled and reinstalled pywalfox. Now I get something strange. which pywalfox returns /home/samueltwallace/.local/bin//pywalfox, notice the last double slash!

Edit: Some googling shows this isn't a big issue. See https://unix.stackexchange.com/questions/11964/what-do-double-slashes-mean-in-unix-path-is-cd-dir-subdir-valid.

Frewacom commented 4 years ago

Perhaps you could try moving the pywalfox executable to /usr/bin/pywalfox and see if that makes a difference.

samueltwallace commented 4 years ago

That works! Thanks a bunch.

Frewacom commented 4 years ago

Glad it works, but it should not be necessary to move it to /usr/bin/ and I guess future updates will require you to move it again, so it is more of a temporary fix.

Is ~/.local/bin/ in your $PATH?

samueltwallace commented 4 years ago

Ah, I think I know the problem now. It goes in my path in my .zshrc, but if the script runs as bash, it probably doesn't get put in. Should that be changed in my .bashrc?

Frewacom commented 4 years ago

Honestly, I should probably fix that in main.sh by giving it the full path to the executable, rather than relying on it being in the users PATH.

I would say keep it as it is for now and we can try an updated version later.