Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Birdtray hard codes a default path #291745

Open
Syonis opened this issue Feb 27, 2024 · 15 comments
Open

Birdtray hard codes a default path #291745

Syonis opened this issue Feb 27, 2024 · 15 comments

Comments

@Syonis
Copy link

Syonis commented Feb 27, 2024

Birdtray hard codes a default path

Steps to reproduce the behavior:

  1. nix-shell -p birdtray
  2. start birdtray

Expected behavior

If you leave it as it is Birdtray tries to start Thunderbird with "/usr/bin/thunderbird"
If you change that to "thunderbird" and launch birdtray it tries to launch "home/user/thunderbird"

Screenshots

birdtray_1 birdtray_2

Notify maintainers

@Flakebi

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/birdtray-path-of-thunderbird/40319/3

@eclairevoyant
Copy link
Contributor

If you've added thunderbird to environment.systemPackages, then something like /run/current-system/sw/bin/thunderbird should work in the settings.

@Syonis
Copy link
Author

Syonis commented Feb 27, 2024

Jep, thx. that worked.
Should I than close this issue? Since the reason isn't fixed?

@AndrewKvalheim
Copy link
Contributor

Ideally the package should manage this e.g. via OPT_THUNDERBIRD_CMDLINE.

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Feb 27, 2024

Ideally the package should manage this e.g. via OPT_THUNDERBIRD_CMDLINE.

That's only going to set the default, and will become wrong if the thunderbird storepath changes, because the config will not update even if the default does.

@AndrewKvalheim
Copy link
Contributor

I see, you’re pointing out that the default is copied to a stateful configuration file rather than merely used as a fallback.

@eclairevoyant
Copy link
Contributor

Yes, and the copying only happens if the config file doesn't already exist. I'm inclined to say that upstream should consider reading from PATH, or provide the capability to do so.

@dotlambda
Copy link
Member

Why don't we patch https://github.com/gyunaev/birdtray/blob/00110c50398cbae4d6da4521ccbf5d7166eac670/src/utils.cpp#L207? Replace the path with lib.getExe pkgs.thunderbird.

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Feb 29, 2024

As said above, that will only affect the default path to thunderbird. That would break as soon as thunderbird updates and the config file points to a nonexistent binary.

If any patching were to be done, it would have to be done in src/settings.cpp, but that would break things for users who actually want to point to a binary elsewhere

@ddogfoodd
Copy link

What if there was a fork of birdtray for nix users that don't want to customize the binary path and just let nix handle it? Wouldn't that work?

@Sikeen
Copy link

Sikeen commented May 26, 2024

what about a check for whether the system is nix or not? would that work?

@Sikeen
Copy link

Sikeen commented May 26, 2024

in this case, another if statement in the code

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Jul 15, 2024

Now that upstream has made a fix, I've created a PR to pull in that commit. Please give the PR #327363 a test and let me know if it works as expected.

@ddogfoodd
Copy link

@eclairevoyant thanks! I am not sure, if it works for me. I can make birdtray start thunderbird and the birdtray log shows an unread message for an inbox as it should. However other than the log and startup, it doesn't seem connected. It shows a red cross as if it was not connected and doesn't show unread counter or quits thunderbird when is quit itself.

@eclairevoyant
Copy link
Contributor

Fair, I don't really use birdtray, so I don't know how it works, just made a best-effort attempt.
If it doesn't work as designed, I can close it out and leave it for someone else to work on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants