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
582 stars 12 forks source link

pywalfox is not working when installed from pipx #121

Open SDD701 opened 4 months ago

SDD701 commented 4 months ago

Hello. Pywalfox is not working when I install it from pipx. The extension says can't connect to native-message-application. Maybe it's related to the path or venvs in main.sh

SDD@ExilOS ~> pywalfox install
Successfully removed manifest at: /home/SDD/.mozilla/native-messaging-hosts/pywalfox.json
Copied manifest to: /home/SDD/.mozilla/native-messaging-hosts/pywalfox.json
Set daemon executable path to: /home/SDD/.local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh
Set execute permissions on daemon executable

SDD@ExilOS ~> cat .mozilla/native-messaging-hosts/pywalfox.json
{
  "name": "pywalfox",
  "description": "Automatically theme your browser using the colors generated by Pywal",
  "path": "/home/SDD/.local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh",
  "type": "stdio",
  "allowed_extensions": [ "pywalfox@frewacom.org" ]
}

SDD@ExilOS ~> bash .local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh
.local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh: line 4: sw_vers: command not found
/usr/lib/python-exec/python3.11/python: No module named pywalfox
/usr/lib/python-exec/python3.11/python3: No module named pywalfox
.local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh: line 10: python2.7: command not found
.local/share/pipx/venvs/pywalfox/lib/python3.11/site-packages/pywalfox/bin/main.sh: line 10: python3.9: command not found
ficok commented 4 months ago

hello! I had the exact same error as your did. I also installed pywalfox via pipx. after running the main.sh script I got the same error message. the last line of the script should be this:

python -m pywalfox start || python3 -m pywalfox start || python2.7 -m pywalfox start || python3.9 -m pywalfox start

I changed it to this:

pywalfox start || python -m pywalfox start || python3 -m pywalfox start || python2.7 -m pywalfox start || python3.9 -m pywalfox start

the daemon and the extension connected and I have successfully set the firefox theme with the extension.

hope that helps!

SDD701 commented 3 months ago

hello! I had the exact same error as your did. I also installed pywalfox via pipx. after running the main.sh script I got the same error message. the last line of the script should be this:

python -m pywalfox start || python3 -m pywalfox start || python2.7 -m pywalfox start || python3.9 -m pywalfox start

I changed it to this:

pywalfox start || python -m pywalfox start || python3 -m pywalfox start || python2.7 -m pywalfox start || python3.9 -m pywalfox start

the daemon and the extension connected and I have successfully set the firefox theme with the extension.

hope that helps!

Yep, that's working now, thank you. I couldn't find where this script in the repo though. It would be nice to make a PR, so I'll leave the issue open for now

johanengstrand commented 3 months ago

Yep, that's working now, thank you. I couldn't find where this script in the repo though. It would be nice to make a PR, so I'll leave the issue open for now

The daemon is in a separate repository.