Firefox in Ubuntu Touch (Libertine)
Ubuntu Touch is an interestingalternative to Android and iOS. But the most critical app (for me), thebrowser, is feeling a bit underwhelming. Luckily, it brings acompatibility layer calledLibertine to run desktopapplications, which means it is relatively straightforward to install anormal desktop firefox. Or so I thought.
Ubuntu famously replaced the regular browser .deb packages with snapones, and snap isn’t really supported on Ubuntu Touch. So we need to doa few extra steps. Also, I’m going to borrow the firefox mobile config,which originally came from postmarketOS, and is also used inMobian/Debian.
All of this is tested on a Oneplus 6 with UT 20.04 (‘focal’).
- Install a Libertine container from the system settings, this willtake a while
- In the container settings, add the ppa to get the .deb for firefox:
ppa:ubuntu-mozilla-security/ppa
- Open a libertine shell (
lish
, if you installed theLibtertine Tweak Tool), check ifapt update && apt install --dry-run firefox
wantsto download the ppa version - In the container settings, install
firefox
- Now, opening FF from the app menu should successfully show a (verysmall) FF window. Close it for now.
- Manually downloadhttps://packages.debian.org/sid/firefox-esr-mobile-config
- Extract the archive (
ar x "firefox*.deb"
), thentar xf data.tar.xz
- Debian uses FF ESR, let’s fix that:
mv usr/lib/firefox-esr usr/lib/firefox
- Copy to the right places:
cp -r usr / && cp -r etc /
touch /etc/mobile-config-firefox/*/*.css
- Let’s fix proper touch screen scrolling:
echo "MOZ_USE_XINPUT2=1 /usr/bin/firefox $*" > /usr/local/bin/firefox && chmod +x /usr/local/bin/firefox
- The default postmarketOS/Mobian config puts the address bar at thebottom. If you don’t like that, here’s how to change it: open
/etc/mobile-config-firefox/userChrome/browser.css
andcomment out the#browser {...}
block (helpfully labeled inthe comment)
Now, if you open firefox, it should be properly scaled, support touchscrolling, and thanks to the magic of Libertine, the on-screen keyboardworks for me as well. Browsing performance is quite good, especiallyconsidering that there is no hardware acceleration yet.