Open Bug 1835141 Opened 11 months ago Updated 10 months ago

deb: Register Firefox as Gnome search provider

Categories

(Release Engineering :: General, enhancement, P2)

Desktop
Linux
enhancement

Tracking

(Not tracked)

People

(Reporter: jan, Assigned: gabriel)

References

(Blocks 1 open bug)

Details

(Keywords: nightly-community)

Depends on bug 1835135.

Readme: https://searchfox.org/mozilla-central/source/browser/components/shell/search-provider-files/README
Example: https://searchfox.org/mozilla-central/source/browser/components/shell/search-provider-files/firefox-search-provider.ini
https://mastransky.wordpress.com/2020/09/25/firefox-gnome-shell-search-provider/

What Fedora does: https://src.fedoraproject.org/rpms/firefox/blob/main/f/firefox.spec#_931

Source34: firefox-search-provider.ini
mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers
cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers

Debian:

  • Add browser.gnome-search-provider.enabled=true to https://github.com/mozilla-partners/deb/blob/main/desktop/deb/distribution/distribution.ini.

  • Install/place a /usr/share/gnome-shell/search-providers/MOZ_APP_REMOTINGNAME.search-provider.ini file:

    [Shell Search Provider]
    DesktopId=MOZ_APP_REMOTINGNAME.desktop
    BusName=org.mozilla.<MOZ_APP_REMOTINGNAME with "-" replaced with "_">.SearchProvider
    ObjectPath=/org/mozilla/<MOZ_APP_REMOTINGNAME with "-" replaced with "_">/SearchProvider
    Version=2
    

    MOZ_APP_REMOTINGNAME can be firefox, firefox-beta, firefox-aurora, firefox-nightly, firefox-esr.
    Maybe generate that file together with the desktop file (bug 1824327).


Test command for manually placing a search provider file:
$ MOZ_APP_REMOTINGNAME=firefox-nightly; DBUS_NAME=${MOZ_APP_REMOTINGNAME/-/_}; sudo mkdir -p /usr/share/gnome-shell/search-providers; echo -e "[Shell Search Provider]\nDesktopId=$MOZ_APP_REMOTINGNAME.desktop\nBusName=org.mozilla.$DBUS_NAME.SearchProvider\nObjectPath=/org/mozilla/$DBUS_NAME/SearchProvider\nVersion=2" | sudo tee -a /usr/share/gnome-shell/search-providers/$MOZ_APP_REMOTINGNAME.search-provider.ini > /dev/null

$ cat /usr/share/gnome-shell/search-providers/*firefox*.ini

[Shell Search Provider]
DesktopId=firefox-nightly.desktop
BusName=org.mozilla.firefox_nightly.SearchProvider
ObjectPath=/org/mozilla/firefox_nightly/SearchProvider
Version=2

Assignee: nobody → gabriel
Severity: -- → N/A
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.