Mobian should not need a lot of tweaks

Let's try to find or open issues in the affected software in addition to adding tweaks, and link them here! This includes when something is matter of preference and it's quite common to change it, there should be a UI for it.

Automatic app scaling

As of version 0.4.0, phoc is now able to automatically scale down windows which are too large to fit the screen. This should be enabled on a per-app basis using the following command:

scale-to-fit <APP-ID> on

The APP-ID depends on how the app itself declares it, here is a small list:

App name ID
Calendar gnome-calendar
Cawbird cawbird
Empathy empathy
Firefox firefox-esr
Geary geary
Maps org.gnome.Maps
Mumble net.sourceforge.mumble.mumble
Nautilus org.gnome.nautilus
Totem totem
Sudoku gnome-sudoku

Note: scale-to-fit wasn't in the initial 0.4.0 package, you might need to upgrade once more to have it installed.

Note: To find out the APP-ID, you can launch your app with WAYLAND_DEBUG=client and check for a line similar to xdg_toplevel@37.set_app_id(“gedit”)

To resize the Evolution reminders window (not launchable and not an app), the app id is evolution-alarm-notify

Add sid repository

Sid is the unstable debian repository with bleeding edge versions. Be careful and recall that some of mobian's packages are patched to work better on a mobile (e.g. gtk). By using sid, you will use a newer version without these adaptations. Also, Mobian developers test only against the debian “testing” versions of packages, so you are on your own if you do that. Modify /etc/apt/sources.list and add this line for the sid repository

deb sid main

Make sid repository the lowest priority by adding it to /etc/apt/preferences.d/00-mobian-priority. Your file should look like this. The order is important.

Package: *
Pin: release o=Mobian
Pin-Priority: 700

Package: *
Pin: release n=sid
Pin-Priority: 300

Package: *
Pin: release o=Debian
Pin-Priority: 500

Disable GNOME Software on startup (or hide apps from app drawer)

Copy the .desktop file to the local user override directory with sudo cp /etc/xdg/autostart/gnome-software-service.desktop ~/.config/autostart/ && sudo chown $(echo $(whoami)). ~/.config/autostart/gnome-software-service.desktop, then edit the new file and add this line to the end: Hidden=true

This can be done for any .desktop file, and if you simply want to hide the icon in the app drawer but keep the startup functionality, add NoDisplay=true to the .desktop file.

Using SSH with a key instead of password

See Security

Taking screenshots

If you want to take screenshots you can use the package grim:

sudo apt install grim

If you want to make a screenshot just call (can be done from SSH)

grim my_screenshot.png

grim does not support delaying taking a screenshot.

In case you want to take a screenshot of something other than your terminal - I don't know who would want to do such a thing ;-) - you can run

sleep 10; grim my_screenshot.png

to delay the taking of the screenshot by 10 seconds.

An even fancier way to take a screenshot using a simple graphical dialog (and initiating it by invoking an “app”) has been described here and works flawlessly on Mobian once the required dependencies have been installed (sudo apt install libnotify-bin grim). The script needs to be adapted to store screenshots in (/home/mobian) rather than home/purism, so, this works:

SCREENSHOT=${HOME}/Pictures/$(date +%Y-%m-%d-%H%M%S).png
notify-send -t 1000 screenshot "Taking a screenshot in 5 seconds"
sleep 5
notify-send screenshot "Screenshot stored at ${SCREENSHOT}"

Screen recording

If you want to record the screen, you can use the package wf-recorder

sudo apt install wf-recorder

If you want to make a video grabbing screen and microphone just call (can be done from SSH)

wf-recorder --file=recording_with_audio.mp4 --audio

Setting up GPS (GNSS)

Satellite based positioning is now set up out of the box. The modem hardware switch needs to be turned on for the Pinephone in order for GPS reception to work. Satellite positioning is only available to web apps through GNOME Web browser.

ModemManager handles the location in mobian, not gpsd. See the relevant arch documentation to get an idea of terminal commands to be used (your modem number could be “0” or any higher number, it is not necessarily stable, find out with mmcli –list-modems ). Location querying is being handled by the GNOME's “geoclue” library. Usually, you will not have to install the gpsd daemon on mobian.

See Location for an in-depth look at how location is determined in Mobian.

Execute USSD Codes

mmcli -m 0 --3gpp-ussd-initiate="*106#"

and replace *106# with your favorite code.

Install small gui
- Open Terminal oder SSH
- Execute (as mobian user)
wget -qO- | bash 

after this your have a small app called USSD.


Enable dark theme

(This appears to be broken in the latest updates)

  1. Open a terminal
  2. Enter the following command: gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'

If you enable a dark theme, gedit's default scheme (probably tango) will use a too light color for highlighting the current line and thus making the text unreadable. To get rid of that problem, one can either set this highlighting to “false” with gsettings set org.gnome.gedit.preferences.editor highlight-current-line false or switch to another scheme, such as solarized-dark, with the command gsettings set org.gnome.gedit.preferences.editor scheme “solarized-dark”.

Set icon theme

Set manually a icon theme with

gsettings set org.gnome.desktop.interface icon-theme 'Your icon theme name'

Exemple with papirus:

Install the icon theme

 sudo apt install papirus-icon-theme 

Set the icon theme with ( for dark theme )

gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'

Set the icon theme with ( for light/default theme )

gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Light'

Set wallpaper background

Set the background manually with

gsettings set org.gnome.desktop.background picture-uri 'file:///home/mobian/Pictures/{yourpicture}.jpg'

As a note, if you get the file incorrect, gsettings will not throw an error but will leave you with a white background. If this occurs, check your command.

Set terminal theme

Set the terminal theme with gsettings set org.gnome.zbrown.KingsCross theme “'hacker'”

Set custom suspend timeout

The GUI in Settings → Power only offers a limited number of timeouts.

To set the suspend timeout to 30 seconds: gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 30

To check the current timeout: gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout

Enable Wireguard

WireGuard is mainlined in Linux kernel 5.6 and higher, and included in the Pine kernel.

  1. Open a terminal
  2. Enter the following command: apt install –no-install-recommends wireguard-tools
  3. You can now use the wg-quick command to manage WireGuard tunnels.

Updating the bootloader

u-boot is automatically updated when the u-boot-sunxi package is updated. If you ever find yourself in a situation where you want to manually update it, you can install the latest version to the boot sector:

sudo u-boot-install-pinephone

Import contacts from VCF file

Syncevolution has been removed from upstream Debian, in the meantime it is straightforward to import contacts from a VCF file via Evolution tooling. First install evolution:

sudo apt install evolution

Before you import the file you will need to set scale-to-fit for Evolution on, otherwise the import dialog page is unusable.

scale-to-fit Evolution on

After this I opened the .vcf file via the Files app, it auto-launched the import dialoug. After importing I removed the Evolution app, this step is optional:

sudo apt remove evolution

sudo apt autoremove

Run local scripts on startup

If you plan to run some tweaks and scripts on startup which used to be run in /etc/rc.local before the systemd times, here is a howto to re-enable that:

- create /etc/rc.local with the following content:

#!/bin/sh -e
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.

# By default this script does nothing. 
exit 0

- chmod +x /etc/rc.local (mark the file as executable)

- systemctl enable rc-local (enable the already predefined rc-local system)

- and test with service rc-local start and systemctl status rc-local

CalDAV and CardDAV

Though there is no native way to sync CalDAV and CardDAV, you can add CalDAV and CardDAV though evolution (evolution in this manner acts as a front end to add the entries into evolution-data-server, and the other programs read from that),

sudo apt install evolution

Before you import the file you will need to set scale-to-fit for Evolution on, otherwise the import dialog page is unusable.

scale-to-fit Evolution on

I found the easiest way to configure it was to configure all of my CardDAV and CalDAV on a desktop version of evolution, backing it up, putting it on the PinePhone, and importing the configuration. After that, you just have to enter in the passwords.

NOTE: Gnome To-Do (the “To-Do” app on Mobian) does not work with CalDAV, so it will not recognize any CalDAV to-do lists. < It does if you use Gnome Online Accounts with Nextcloud, for example.

USB-C chargers / smart chargers not charging phone

This appears to be related to the kernel module for a chip in several USB-C-to-HDMI adapters. It can be fixed by blacklisting the module.

To fix it, create or edit the file /etc/modprobe.d/blacklist.conf and add the following line:

blacklist anx7688

Reboot, and smart chargers should now charge correctly.

Mount SDcard as /home (Unencrypted)

If you want to install Mobian to the eMMC and use an sdcard as your /home partition, you will need to first install Mobian on the internal MMC.

Once it is complete, power down the phone, and either insert a different, fresh sdcard with an ext4 partition, or format an existing sdcard by mounting it on your desktop, creating a new MSDOS partition table (in gparted, parted, etc), and then running sudo dd if=/dev/zero of=/dev/YOURSDCARDDEVICE bs=512 seek=16 count=1 to overwrite the u-boot signature (otherwise the phone will try to boot from it still). Ensure that you do not run this command against the wrong device! Finally, create a new ext4 partition on the sdcard, and then eject it.

Now that you have Mobian installed on the eMMC and a fresh sdcard inserted, power on the phone and launch the terminal. First, mount the sdcard by running sudo mkdir /mnt/sdcard && sudo mount -t ext4 /dev/mmcblk0p1 /mnt/sdcard. Then, copy the current contents of /home to it with sudo cp -aR /home/* /mnt/sdcard/. Then, unmount it from the temporary mountpoint with sudo umount /mnt/sdcard, and mount it at /home with sudo mount -t ext4 /dev/mmcblk0p1 /home. Finally, we will need to acquire the UUID of the sdcard and add an entry to fstab. Run sudo blkid /dev/mmcblk0p1 to get the UUID, and then copy just the UUID (it will look like 1f255d6ae-1634-2aa4-172cfa15) and edit /etc/fstab with vim or nano (or whatever). Copy the first line, and paste it at the bottom of the file as a new third line. Then replace the UUID with what you copied from the output of blkid, and change the / to /home, and finally change the final 0 to a 2 (this will tell fsck to check it after the other entries). It should look like this: UUID=a2c1f977-0405-4ae1-8169-639b8ae53e3b /home ext4 defaults 0 2

After this execute 'sudo chown -R mobian:mobian /home/mobian' and replace 'mobian' with your current user to ensure the permissions are set correctly.

At this point your sdcard will be persistently mounted to /home, and will have all the files that the initial /home had. Congratulations, you now have more than 16GiB available for your files!

Auto-connect bluetooth headset

You can setup pulseaudio to automatically connect to any new bluetooth headset. Simply add the following line to /etc/pulse/

load-module module-switch-on-connect

Enable ZRAM

ZRAM support is built into the Mobian kernel, and creates a swap block that runs in realtime on physical RAM with compression. It makes swap almost as fast as physical memory, while also making it more efficient, so it is ideal for low-memory devices (it has been used for years in all Android and ChromeOS devices). Fedora is also most likely making it the default in release 33.

To enable it, install the package zram-tools (sudo apt install zram-tools). Then edit /etc/default/zramswap and uncomment the PERCENTAGE line, and change the value to any value between 0 and 200. According to The authors of zram-config (Link to Github), zram compression lays between 220-450%, meaning that up to 4.5 times the physical RAM may in some circumstances fit into a zram space. A value of 50 should be on the safe side, more adventurous users have successfully set it to 200.

Make the internal speaker louder

Sometimes, it seems like the internal speaker is quiet compared to other phones even though the volume is set to maximum. You can adjust the gain of the “line out” using alsamixer.

$ sudo apt install alsa-utils
$ alsamixer

Once the mixer comes up you can use F6 and pick the “PinePhone” device. From there, use the left and right arrow keys to find “Line Out” and then the up arrow to boost the gain of it. You can also boost it a little further by going to “Line Out Source” and picking “Mono Dif” instead of stereo.

Home screen launcher for Voicemail

For certain commonly used phone numbers it's great to have a launcher on the home screen that automatically dials it instead of having to look in contacts, recent calls, etc. It turns out that the calls app supports dialing phone numbers from the command-line and so it is possible to invoke it with a specific phone number from a launcher. Here's an example launcher that you can put in /home/mobian/.local/share/applications/voicemail.desktop.

[Desktop Entry]
Comment=Dial voicemail
Exec=calls --dial=<voicemail_phone_number_here>

Note that you put whatever your voicemail phone number is in the Exec line. Also, pick the icon that you would like for the launcher or even download a png file somewhere on your phone (e.g. /home/mobian/.local/share/icons) and give that path to it here. Either reboot your phone to see the new launcher or run

update-desktop-database /home/mobian/.local/share/applications

Prevent suspend & keep the screen on

Some applications do not keep the screen on and the screensaver (or suspend) kicks in. (Video players such as mpv come to mind). In these case the built-in gnome-session-inhibit tool can be useful. You can use it to run a program and it will inhibit the screensaver and suspend while the program is running. You can override certain desktop launchers in /usr/share/applications to wrap them with gnome-session-inhibit. See the mpv page to see an example.

Changing the default username from mobian

To change the current username, you can copy the following section into a text file, make it executable with chmod +x scriptname and run it with sudo ./scriptname.

After the reboot every instance of the username will be replaced with your choice.


# A script to change the current username

# Get current username
printf "\nType the current username:\n"
read old

# Set desired username
printf "\nType the desired username:\n"
read new

# Home paths

# Change username
printf "\nChanging username\n"

for file in group gshadow passwd shadow subgid subuid
    sed -i "s/$old/$new/g" /etc/$file*

# Rename home folder
mv /$ohp /$nhp

# Fix path references in /home for new user
printf "\nAdjusting paths in home directory\n"

grep -rl "$ohp" /$nhp | xargs sed -i "s+$ohp+$nhp+g"

# Set user info
chfn $new


If you want to get your hands dirty for educational purposes or you just like to tinker around, you can also follow the instructions below:

This procedure requires ssh unless there is a way to log in as a different user on the phone itself. The main command involved in changing a username requires that all processes running under that user be closed – as a result, we will need to kill phosh and will lose access to the phone through the touch screen (requiring ssh). First, we will add a temporary user and give it sudo privileges. Although it probably won't matter because we are using ssh, consider only using numbers when creating temp's password.

sudo adduser temp

sudo adduser temp sudo

Don't forget to give the temporary user your ssh credentials if you use public key login.

sudo mkdir /home/temp/.ssh && sudo cp /home/mobian/.ssh/authorized_keys /home/temp/.ssh/authorized_keys

sudo chown -R temp:temp /home/temp/.ssh

Now, exit/logout and log back in as temp through ssh. We want to run commands to rename your username, home folder, and group. When you run the command below (sudo usermod -l newusername -m -d /home/newusername oldusername), it will fail because phosh is still running. You will see a message like the following: usermod: user mobian is currently used by process XXXX

Run ps -ax | grep XXXX, where XXXX is the PID referenced in the message above, to see what is running. Ensure it is something you are willing to close (it should only be phosh unless you have something else running). Use sudo kill XXXX, which will stop your phone's screen from displaying anything. Now, the two commands below should run:

sudo usermod -l newusername -m -d /home/newusername oldusername

sudo groupmod -n newusername oldusername

Then modify /etc/dconf/profile/user and replace mobian with your new username.

Run sudo reboot and make sure everything is working. If you have any dotfiles that specify file paths using /home/mobian, you will need to change them. If you were using a custom picture in a directory within /home/mobian as your wallpaper, you will need to set it again.

Finally, you can delete your temporary user:

sudo userdel -r temp