Difference between revisions of "Firefox"

From postmarketOS
Jump to: navigation, search
(Specific firefox config)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page explains how to make firefox usable in plasma-mobile.
+
This page explains how to make firefox usable in mobile UIs like plasma-mobile.
 
+
[[File:Nexus5-Firefox.jpg|thumb|right|frame|none|alt=Alt text|Firefox running on plasma-mobile]]
 
== Firefox 52 ==
 
== Firefox 52 ==
 
Install firefox-esr package from alpine. It is currently firefox 52.9.0-r1
 
Install firefox-esr package from alpine. It is currently firefox 52.9.0-r1
Line 19: Line 19:
  
 
=== Configuration on gtk ===
 
=== Configuration on gtk ===
Edit .config/gtk-3.0/settings.ini with:
+
Edit ~/.config/gtk-3.0/settings.ini with:
  
 
<source lang="C">
 
<source lang="C">
 
[Settings]
 
[Settings]
gtk-icon-theme-name = Gnome
+
gtk-icon-theme-name = Paper
gtk-font-name = Sans 13
+
gtk-cursor-theme-name = Paper
gtk-cursor-theme-name = Numix
+
gtk-fallback-icon-theme = Gnome
gtk-fallback-icon-theme = Numix
+
gtk-font-name = Sans 10
 
gtk-cursor-theme-size = 0
 
gtk-cursor-theme-size = 0
 
gtk-toolbar-style = GTK_TOOLBAR_BOTH
 
gtk-toolbar-style = GTK_TOOLBAR_BOTH
Line 35: Line 35:
 
gtk-enable-input-feedback-sounds = 1
 
gtk-enable-input-feedback-sounds = 1
 
gtk-xft-antialias = 1
 
gtk-xft-antialias = 1
gtk-xft-hinting = 0  
+
gtk-xft-hinting = 0
 
gtk-xft-hintstyle = hintfull
 
gtk-xft-hintstyle = hintfull
 
gtk-xft-rgba = rgb
 
gtk-xft-rgba = rgb
gtk-icon-theme-name = Numix
 
 
</source>
 
</source>
  
You may ajust Font size for your screen
+
Make sure to install '''gnome-icon-theme''' and '''paper-icon-theme''' packages
 +
 
 +
You may ajust Font size for your screen.
  
 
=== Environment variables for starting Firefox ===
 
=== Environment variables for starting Firefox ===
Line 48: Line 49:
  
 
<source lang="C">
 
<source lang="C">
MOZ_USE_XINPUT2=1 GDK_SCALE=2 firefox %u
+
MOZ_USE_XINPUT2=1 GDK_SCALE=3 firefox %u
 
</source>
 
</source>
  
Line 56: Line 57:
 
<source lang="C">
 
<source lang="C">
 
[Desktop Entry]
 
[Desktop Entry]
Exec=MOZ_USE_XINPUT2=1 GDK_SCALE=2 firefox %u
+
Exec=MOZ_USE_XINPUT2=1 GDK_SCALE=3 firefox %u
 
...
 
...
 
</source>
 
</source>
 +
 +
== User agent ==
 +
If you would like to switch between mobile and desktop page editions easily, the [https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher-revived/ User Agent switcher] extension will allow for easy switching between different user agents.
  
 
== Upcoming versions ==
 
== Upcoming versions ==
  
 
With upcoming versions (> 55) we will be able to use the multi-touch zoom extension to get fluid zooming.  
 
With upcoming versions (> 55) we will be able to use the multi-touch zoom extension to get fluid zooming.  
https://addons.mozilla.org/en-US/firefox/addon/multi-touch-zoom/
+
https://github.com/haxiomic/firefox-multi-touch-zoom
 +
 
 +
[[Category:Apps]]

Latest revision as of 10:29, 27 December 2018

This page explains how to make firefox usable in mobile UIs like plasma-mobile.

Alt text
Firefox running on plasma-mobile

Firefox 52

Install firefox-esr package from alpine. It is currently firefox 52.9.0-r1

Specific firefox config

Go in your profile directory (.mozilla/firefox/xxxxxxxx.default/) then exec:

echo 'user_pref("dom.w3c.touch_events.enabled", true);' >> prefs.js
echo 'user_pref("browser.gesture.pinch.in", "cmd_fullZoomReduce");' >> prefs.js
echo 'user_pref("browser.gesture.pinch.out", "cmd_fullZoomEnlarge");' >> prefs.js
echo 'user_pref("general.useragent.site_specific_overrides", false );' >> prefs.js
echo 'user_pref("general.useragent.override", "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Safari/537.361");' >> prefs.js

And restart the browser.

Configuration on gtk

Edit ~/.config/gtk-3.0/settings.ini with:

[Settings]
gtk-icon-theme-name = Paper
gtk-cursor-theme-name = Paper
gtk-fallback-icon-theme = Gnome
gtk-font-name = Sans 10
gtk-cursor-theme-size = 0
gtk-toolbar-style = GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size = GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images = 0
gtk-menu-images = 1
gtk-enable-event-sounds = 1
gtk-enable-input-feedback-sounds = 1
gtk-xft-antialias = 1
gtk-xft-hinting = 0
gtk-xft-hintstyle = hintfull
gtk-xft-rgba = rgb

Make sure to install gnome-icon-theme and paper-icon-theme packages

You may ajust Font size for your screen.

Environment variables for starting Firefox

You can start firefox with:

MOZ_USE_XINPUT2=1 GDK_SCALE=3  firefox %u

You may ajust scale to your device screen size, but it may only be integers.

You can edit your desktop shortcut /usr/share/applications/firefox.desktop :

[Desktop Entry]
Exec=MOZ_USE_XINPUT2=1 GDK_SCALE=3  firefox %u
...

User agent

If you would like to switch between mobile and desktop page editions easily, the User Agent switcher extension will allow for easy switching between different user agents.

Upcoming versions

With upcoming versions (> 55) we will be able to use the multi-touch zoom extension to get fluid zooming. https://github.com/haxiomic/firefox-multi-touch-zoom