fenix-fox/README.md
Claudia Pellegrino f036c507eb Release 4.2.0
Features:
 * Hide minimize/maximize/close buttons (MR 39)
 * autoconfig: set media.webrtc.camera.allow-pipewire (MR 38)
 
 Other:
 * README: update supported versions
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEVuhTDbWL3IASV/XwWuf1UT4IhcsFAmUH7NUACgkQWuf1UT4I
 hctcwQ/+NRyPe1mBvmRP9nqhhvNFw8nz6eTBe9oEzokI5DsTcgcW41y5JxRR3Wek
 iG2cwePfrAgEKEZYP67lYEizULTeAMv0st+t4c4D2a9c4WVBVVOLXQf5e9C0CviM
 H/hfHQWfflTIv9KrG2850wuBdLQC6eRsD1BR0gagnMyS6oo7mD8GmTUfyuj1XCic
 yAnBvf51MlI2z1aYyZb2yRmjaVjY4bNe1ECmQNCyxPlyPw6dRNL+hd45y5AEZEHE
 99zSIKqmGe5KocP93ZxcgPAjQBGW1htxbiKpQXOrk6UV06byGhyf0SzpLnq5GSD7
 76N3Loxh+Fe0gbJao1EluGo2yaUUX1mkoonu9Q6LQJ0HSyVRTD4f5Twu2/K3oqH6
 lLkj0ysMY3yguBg4UX7qx4LQkUpoGdG/XWDky8oxInXOIFuJf2R0dxiU8u44IfLR
 U5l4qFBklQFDyYYD/CJPIRIQDUJogxDp4T6p8EvA/8GMS8M+5UTftyJGnaR10l9Q
 X7dIHu+dbwNkfpQ1WAJKr+LXsl2LjlIRNoIpMBaYzggfdz9F94lad8xBzTvTkLHK
 ntGsx45w2LedronJiPKJfL59L/FoPMxSU5xEg3AvhLtKncD3IwTOmJqZLMjG2xPJ
 zx8Av7a6ML/im2fMzMPOIGYTGSUZ1ux6tEtHRkOnITKJ0GrmV+A=
 =vVzW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJkCsxybnOIqyroEaeqZ957cxOc4FAmVRIjgACgkQeqZ957cx
 Oc7Gww//XFnz5icUuCM24ZJdki0+lRrknKqng72R/99L08JEy6RS4vZbWt1UJN8I
 R2Q+aca+HympnCAmI60XyANF6QrtUgyGKJen6JeA2Pxzd8nPVfy2NRUY6mjkdDXx
 JOGNvGme3WqQCFFI8KAujH8HQ4Kw1m7LQ/DOq5W6AqaxaidhgCeaotrVnrWJcc5Q
 zVWAyYuMLCud9+Q/4jjtzvoLEM2QosdZX9s5iS2NKd1VBRLQ8iE3qONKR0SWK4QV
 C3HE9VBQOtgUh2Zl9XFBjOFyHUEosmMCAz4LgsfQVMQtUXi4I2kNpBkB/BiyAW0A
 kN62ZvDK0wUXpCXHfIOxREuDkZL1XSx0tfp6JtQF9K3eijglCrbEpMB9KzunglUc
 mlUIl0bZhXy9IndktiFg0aKRCO2fswmwWrS0kc4LPntR2z8Cgja7DN2LZh198s+p
 vQIzcWaECnVN5XO394pLmyEFU+CwROU7n4x/JqBFwBZuHyr6MS2/eXeUOLX49Toz
 URlOH5uohni0yxVyUh567vXE2opm5X0L2OfN1b0rYBPDyMSvpz/s2rxay3BCyNKb
 uXBWkTI7xONqqwipVfsYNyIJro4l0xu/3uf9CAycXspan6RPx349enAtbAaoYh+s
 02sv2mcMkSJ5q1578CaS1lBTt0WkCYegedxP6Df1QtwGhzKDtM8=
 =lm/S
 -----END PGP SIGNATURE-----

Merge tag '4.2.0' into librem5-mirror

Release 4.2.0

Features:
* Hide minimize/maximize/close buttons (MR 39)
* autoconfig: set media.webrtc.camera.allow-pipewire (MR 38)

Other:
* README: update supported versions
2023-11-12 20:06:01 +01:00

6 KiB
Raw Blame History

Mobile-Friendly Firefox Customizations for Librem 5 (mirror)

Mobile and privacy friendly configuration for current standard and extended support releases of Firefox.

This read-only mirror is tracking all changes posted by @user0 in the thread Mobile-Friendly Firefox Customizations for Librem 5 on Purisms forums.

This repository is maintained by Claudia Pellegrino (@claui).

As a read-only mirror, its not accepting pull requests. The code in this repository also does not replace a proper implementation in Firefox upstream (interesting stuff happens in issues linked in "References").


Note: Below follows a copy of the original README.md file from the upstream project postmarketOS/mobile-config-firefox.


What this config does

  • Adapt UI elements and "about:" pages to small screen sizes (when opened on small screen)
  • Enable mobile gestures
  • Privacy tweaks:
    • Disable search suggestions
    • Disable Firefox studies
    • Disable Telemetry
    • Set DuckDuckGo as default search engine, remove other search engines except for Wikipedia (only works in Firefox ESR, limitation of policies.json)
    • Install uBlock origin by default (why?)
  • Uncluttering:
    • Disable built-in advertisements (e.g. hardcoded links for certain social media sites on the start page)
    • Disable "User Messaging" about new features etc.

There's a screenshot thread of the 3.0.0_rc1 release.

For users: making changes

As user, it is possible to override all options set by this project. Usually it can be done in the preferences (which are now adaptive, so you can actually use them on your phone).

If it cannot be changed in preferences, look in /etc/firefox/policies/policies.json. You can see the active policies while Firefox is running in about:policies. The uBlock origin add-on for example, is getting installed through policies.json and can be removed in that file if you do not want it. Without editing the file, it can only be disabled in the add-on settings, and not removed, this is a limitation of policies.json.

Feel free to create an issue if you run into problems. Or even better, attempt to fix the problem yourself (see development instructions below) and submit a merge request.

Contributing changes to userChrome

Firefox' developer tools include a remote debugger, which even has the "pick an element" feature. You will be able to click that button on your PC, then tap on an element of the Firefox UI on your phone, and then you will see the HTML code and CSS properties on your PC just as if it was a website. So this is highly recommended when contributing changes to userChrome.css.

  • Connect your phone and your PC to the same network (Wi-Fi or USB network)
  • On your phone, open Firefox and about:config:
    • Change devtools.chrome.enabled to true
    • Change devtools.debugger.remote-enabled to true
    • The debugger will only listen on localhost by default. If you know what you are doing, you may set devtools.debugger.force-local to false, so it listens on all interfaces. Otherwise you'll need something like an SSH tunnel.
    • Close firefox
  • Connect to your phone via SSH
    • Set up environment variables properly, so you can start programs (one lazy way to do it, is tmux on your phone in the terminal, then tmux a in SSH)
    • Run firefox --start-debugger-server 6000 (or another port if you desire)
  • Run Firefox on your PC
    • Go to about:debugging
    • Add your phone as "network location" (172.16.42.1:6000 if connected through USB Network)
    • Press the connect button on the left
    • If it does not work, check if a firewall on your phone is blocking the port (i.e. nftables in postmarketOS).
  • On your phone
    • Confirm the connection on your phone's screen
      • If the button is not visible on the screen, try switching to a terminal virtual keyboard, hit "tab" three times and then return
  • On your PC
    • Scroll down to Processes, Main Process, and click "Inspect"
    • Now use the "Pick an element" button as described in the introduction. Find the userChrome.css file in the "Style editor" tab and edit it as you like.
    • Consider copy pasting the contents to a text editor every now and then, so you don't lose it when closing Firefox by accident.

Note that after making changes to CSS files, and deploying them on your system (make install), you might need to restart firefox twice before changes are applied.

Log file

The src/mobile-config-autoconfig.js script generates userChrome.css and userContent.css while Firefox starts. It logs to your Firefox profile directory, follow the log file with:

$ tail -F $(find ~/.mozilla -name mobile-config-firefox.log)

Coding guidelines

  • Don't make longer lines than 79 columns where possible (like in PEP-8)
  • Use 4 spaces for indent in all files, except for shell scripts (use tabs there). Consider configuring your editor to use .editorconfig, then it gets configured automatically.
  • Linter: .ci/lint.sh (consider setting it as pre-commit hook, requires GNU grep)

Additional resources