pmaports/main/postmarketos-config-firefox/APKBUILD
Oliver Smith 9b2a0a796d
main/postmarketos-config-firefox: new aport (MR 1445)
Add policies.json and prefs.js to configure Firefox (yes, you need both
to be able to control all this):

Mobile improvements:
* Enable zooming with fingers
* Mobile user agent (from tor browser for android)

Privacy improvements:
* Disable search suggestions, so URLs do not get sent to search engines
  as they are getting typed.
* Disable Firefox studies
* Disable Telemetry
* Set DuckDuckGo as default search engine, not Google

Uncluttering (screen space, remove broken features, less distractions):
* Move all buttons to the overflow menu and remove spacers around the
  address bar
* Empty "new tab" page (loads faster, no annoying "top sites" etc.)
* Disable developer tools, so the hamburger menu fits the screen of the
  pinephone. These aren't really useful on phones anyway.
* Disable "Firefox Screenshots": the feature did not work with the mobile
  resolution in Phosh.
* No default bookmarks from Firefox
* Disable First Run Page
* Disable Post Update Page
* Disable "User Messaging" (What's new, Extension/Feature
  Recommendations, Urlbar Interventions)

Add a local html file that serves as lightweight default homepage. It
links to the postmarketOS blog and wiki, explains that this is desktop
firefox with mobile configuration and explains how to change settings
and install addons (with a direct link to ublock origin). Users can
override the homepage, new tab page, search engine, search suggestions
pre-configured by this package directly in the UI.

I chose Firefox ESR, because:
* It fits the screen better: the "new tab" button is bigger, the menu
  opening when you click the top-right button actually fits the screen,
  with all its submenus. There are zoom controls in the same menu, which
  make the preferences pages very usable.
* It's possible to override the default search engine with a policy
  file; that's not possible in non-ESR firefox (we'd probably need to
  change it in the sources).

Related: https://github.com/mozilla/policy-templates
Co-authored-by: Martijn Braam <martijn@brixit.nl>
2020-07-24 17:24:00 +02:00

21 lines
994 B
Text

pkgname=postmarketos-config-firefox
pkgver=1
pkgrel=0
pkgdesc="Firefox tweaks for mobile and privacy (works best with Firefox ESR)"
url="https://postmarketos.org"
source="home.html policies.json prefs.js"
arch="noarch"
license="GPL-3.0-or-later"
options="!check"
package() {
install -Dm644 "$srcdir/prefs.js" \
"$pkgdir/usr/lib/firefox/defaults/pref/pmos-prefs.js"
install -Dm644 "$srcdir/policies.json" \
"$pkgdir/etc/firefox/policies/policies.json"
install -Dm644 "$srcdir/home.html" \
"$pkgdir/usr/share/postmarketos-config-firefox/home.html"
}
sha512sums="eb25ab01db4e489c0427ffaabfb7e4b3d208a5cff675c6d4b4ea4a51f4b3eb3b48461e7b2add266e2b25cfedf79bfb5537947e7b85aa7f0647ea6be1ceac1b47 home.html
04a5477dd4fbfe47ace1993b6a1e9b48be6d26b4ccc4e0933e1e783409d70d918982d7012475537b434acf7c31cfa1eed53a6a4526b62bba94ff1537197ced93 policies.json
3bf448484fa75e54d0b1ad48718424b3175a662467965480c7c89e9b3e15927e2e1773d0076590a50c6f0802855fc21d7c62bda27982fc06af8e5538050bc4ed prefs.js"