Skip to content

firefox: read the appName for search engine disclaimer from package#5685

Merged
rycee merged 1 commit intonix-community:masterfrom
kkoniuszy:firefox-read-appname-from-package
Nov 17, 2024
Merged

firefox: read the appName for search engine disclaimer from package#5685
rycee merged 1 commit intonix-community:masterfrom
kkoniuszy:firefox-read-appname-from-package

Conversation

@kkoniuszy
Copy link
Copy Markdown
Contributor

@kkoniuszy kkoniuszy commented Jul 29, 2024

Description

Using a fixed application name in the salt for the search engine name hash can break with minor branding changes. For example, LibreWolf 127 used the application name "LibreWolf", but in version 128 it's "Firefox".

The proper name can be found in about:support -> Application Basics.

Because it doesn't have to be related to the product name visible in most of the browser (for example in the window title and help menus), we shouldn't rely on cfg.name for that.

The application name can be read from lib/*/application.ini and we can use that if the browser was installed via home-manager. If not, we can fall back to cfg.name.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@rycee @brckd @kira-bruneau

Copy link
Copy Markdown
Contributor

@kira-bruneau kira-bruneau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kkoniuszy!

Copy link
Copy Markdown
Contributor

@donovanglover donovanglover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed changing the default search engine for me with LibreWolf and #5684. Looking forward to the merge!

Copy link
Copy Markdown
Contributor

@MithicSpirit MithicSpirit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been using this and #5684 for a couple of days now, and it's been working very well.

@donovanglover
Copy link
Copy Markdown
Contributor

Merge conflict is due to #5697

@kkoniuszy kkoniuszy force-pushed the firefox-read-appname-from-package branch from 49cc1ed to e55fc68 Compare November 3, 2024 18:42
@github-actions github-actions bot added the mail HM email accounts, thunderbird, alot, notmuch, msmtp, meli... label Nov 3, 2024
@kkoniuszy
Copy link
Copy Markdown
Contributor Author

Conflict resolved

@teto
Copy link
Copy Markdown
Collaborator

teto commented Nov 16, 2024

we got kira-bruneau's approval so it's good to go, just need a rebase to fix ci

@kkoniuszy kkoniuszy force-pushed the firefox-read-appname-from-package branch 2 times, most recently from f4b38b0 to 4ad0a2b Compare November 17, 2024 07:02
Using a fixed application name in the salt for the search engine name
hash can break with minor branding changes. For example, LibreWolf 127
used the application name "LibreWolf", but in version 128 it is
"Firefox".

The proper name can be found in about:support -> Application Basics.

Because it doesn't have to be related to the product name visible in
most of the browser (for example in the window title and help menus),
we shouldn't rely on cfg.name for that.

The application name can be read from lib/*/application.ini and we can
use that if the browser was installed via Home Manager. If not, we can
fall back to cfg.name.
@rycee rycee force-pushed the firefox-read-appname-from-package branch from 4ad0a2b to aecd341 Compare November 17, 2024 21:58
@rycee rycee merged commit aecd341 into nix-community:master Nov 17, 2024
@rycee
Copy link
Copy Markdown
Member

rycee commented Nov 17, 2024

Thanks! Merged to master now 🙂

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

Labels

mail HM email accounts, thunderbird, alot, notmuch, msmtp, meli...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants