The focus of this page is on standard GNU/Linux distros such as postmarketOS, Debian/Phosh, Fedora and so on. Ubuntu Touch UBports is a different kind of creature altogether and many notes on this page may not apply there.
Table of Contents:
Listings of potential mobile-friendly Linux apps:
Librem5 gitlab has patches for some Linux apps for mobile friendliness:
This guy has been collecting detailed test results of various Pinephone distros and support with different cell carriers (Verizon, T-Mobile, etc.):
postmarketOS, Mobian/Phosh and probably others ship with GNOME Web as the default browser. It's currently the best optimized mobile web browser for Linux and has built-in support to "Install Site as Web Application" to add an app launcher for web apps.
Installed web apps run in a mode where the URL bar is replaced by just a title bar and seems to have a sandboxed profile (no cookie sharing with the normal GNOME Web sessions).
You may want to customize the User Agent to look like mobile Firefox so
that sites like
mobile.twitter.com will give a more modern front-end UI
instead of one that looks themed after Android 2.x
Run this command to set the User-Agent to appear like Firefox:
gsettings set org.gnome.Epiphany.web:/org/gnome/epiphany/web/ user-agent "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"
See also Firefox on postmarketOS Wiki
Firefox is another decent web browser for mobile Linux. With a few
tweaks you can enable better touch controls. Some parts of Firefox UI is not very
mobile friendly and you probably only want to open one tab per window, as the tab
bar doesn't fit on screen very well when you have 2+ tabs open.
To set the necessary about:config tweaks, easiest is to use your prefs.js. From the postmarketOS wiki:
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.
GNOME Online Accounts already has built-in support to use Nextcloud and syncs your Contacts and Calendar with the respective GNOME apps. You can also browse your Nextcloud filesystem using the File Browser (Nautilus) app.
The desktop app for Linux is probably not mobile friendly but it has a
command-line program called
nextcloudcmd which may be usable to set up a
traditional sync to local filesystem. I haven't tested it yet.
I use the KeePass password manager and so need to find a good app for this that I can use from my smartphone.
Currently I haven't found a native app that is mobile-friendly and fits on the small display of the phone.
As a workaround I found that KeeWeb has a usable enough mobile interface in the form of a web application. I installed it as a plugin on my Nextcloud server. For best security you might install it directly onto the local host of your phone, e.g. with nginx and access it at http://localhost. Otherwise self-host it on a web server you control.
At time of writing, GNU/Linux distros don't have a security model as good as what's available on Android. Linux security mainly boils down to filesystem-level access controls, but there's very little in the way to prevent two user-space apps from messing with each other's data.
Like on a desktop Linux system, common sense applies, don't install random dodgy
software from unknown sources, don't
wget | bash to run unknown scripts without
reading them first and verify what they're doing, etc.
On distros running Phosh your user password is required to be a numeric PIN code
that you unlock the screen with. These sorts of passwords are very weak and
you may want to disable
sudo access to your account and instead set a very
root user password.
Some misc tips relevant to Linux on smartphones:
This is generally applicable to all Pinephone GNU/Linux distributions (Mobian, postmarketOS, etc.) that use Wayland as the compositor (most/all of them) and especially works with the Phosh shell (haven't tested others).
grim; for screen recording:
Screenshots (can be done over SSH):
# The command by itself auto creates a png in your home folder. grim # Specify a filename grim filename.png # Delay 10 seconds before taking the screenshot to get something other # than your terminal window sleep 10; grim
# Record a video. wf-recorder --filename output.mp4 # Record including audio from eg. microphone. wf-recorder --audio --filename output.mp4
Just some notes on what each GNU/Linux distro comes with out of box and some notes.
Mobian/Phosh (Oct 5 2020)
postmarketOS is based on Alpine Linux which is a very minimalist distro and
ships with Busybox by default, meaning standard
CLI tools like
du are Busybox versions and not the standard
GNU coreutils found on most Linux distros.
So some CLI options to these programs aren't supported in Busybox, like
grep --exclude or
du --max-depth or
less -r and several of my bash shell
aliases relied on these options.
To install GNU versions (see also How to get regular stuff working from Alpine Linux wiki):
apk add coreutils grep less