1. Why Build for Ubuntu Touch
Ubuntu Touch is a mobile operating system maintained by the UBports Foundation and its community. It runs Lomiri, the convergent desktop-and-phone shell that descended from Unity 8, on top of a standard Ubuntu base. No Android layer, no vendor lock-in, real Qt underneath.
Three things make it a genuinely good platform to develop for:
- Convergence is real. The same QML app runs on a phone, a tablet, and a desktop monitor. You write the UI once and adapt with the same components.
- The ecosystem is small enough that you matter. Every quality app gets noticed. The OpenStore curates by default and the community actually reports bugs back to you.
- The stack is honest. Qt Quick, Python, C++, SQLite, real Linux APIs. The skills transfer directly to desktop Qt and embedded work.
This is the workflow I use for my own published apps: utgpt (on-device AI chat) and Time Management (Odoo-integrated timesheets). Everything in this guide is from real shipping code, not theory.
2. What You Need
The whole toolchain is one command-line tool called Clickable. It compiles, packages, deploys, and debugs your app, and it does all the heavy lifting inside Docker, so your host system stays clean.
Hardware and OS
- A Linux desktop. Ubuntu is the smoothest path, but any distro works since the build runs in a container.
- Optional but recommended: an actual Ubuntu Touch device. The community maintains ports for the Nexus 5, OnePlus 6/6T, Pixel 3a, Fairphone 4, PinePhone, Volla phones, and more. You can develop entirely on the desktop, but nothing beats testing edge swipes and gestures on real hardware.
Installing Clickable
The pipx route is the one the Clickable docs recommend today:
sudo apt install docker.io adb git python3 pipx python3-setuptools
pipx install clickable-ut
# Make sure pipx-installed binaries are on your PATH
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
# Let Clickable set up Docker and shell completion (asks for root)
clickable setup
There are alternative install methods if you prefer them: snap install clickable, the PPA ppa:bhdouglass/clickable, or NixOS packages. The tool and the project layout are identical either way.
3. Scaffolding with Clickable
Create a new app with a single command. Clickable will ask for a name, title, author details, and which template to use:
clickable create
Pick the Python template (QML interface, Python logic over PyOtherSide). The other templates are QML Only, C++, Go, Rust, HTML, SDL, and Godot, and you can migrate between them later by hand if your needs change. For this walkthrough we will use the app ID hello.surajyadav with the short name hello.
Enter the new directory and run Clickable with no arguments. The default chain is build install launch, so it compiles, packages a click, installs it on a connected device, and starts it. The first build downloads a Docker image of roughly 1GB, so fetch a coffee. Subsequent builds are fast.
cd hello.surajyadav
clickable
4. Anatomy of a Click App
Everything Clickable generated has a purpose. Here is the layout:
manifest.json— the metadata of your app: ID, version, framework, maintainer, and the hooks that link the apparmor profile and desktop file.clickable.yaml— build configuration for Clickable itself: minimum version, builder, and any extra build steps.qml/— all QML files.Main.qmlis the entry point.backend/— the Python package that QML talks to. In my utgpt app this holds model discovery, downloads, and the inference bridge.hello.apparmor— the security policy (covered in section 8).assets/— icons and static files.po/— translation catalogues, wired throughi18n.tr()in QML.
The manifest is the file you will touch most often. Yours looks roughly like this, with Clickable substituting the architecture and framework at build time:
{
"name": "hello.surajyadav",
"title": "Hello",
"description": "Tiny demo app built for the Ubuntu Touch tutorial",
"version": "1.0.0",
"maintainer": "Suraj Yadav <surajyadav200701@gmail.com>",
"architecture": "@CLICK_ARCH@",
"framework": "@CLICK_FRAMEWORK@",
"hooks": {
"hello": {
"apparmor": "hello.apparmor",
"desktop": "hello.desktop"
}
}
}
The @CLICK_ARCH@ and @CLICK_FRAMEWORK@ placeholders get replaced by Clickable at build time, which means your app builds for both arm64 phones and amd64 desktops without editing. Set the framework to match the Ubuntu Touch release you target; 20.04 is the long-standing stable one on devices today, with 24.04 rolling out.
5. The QML Frontend
QML is a declarative UI language: you describe what the interface is, not how to draw it. The Lomiri Components module gives you the platform widgets, so your app automatically follows the system theme, greets the user in their language, and scales across phone and desktop.
Here is a complete, working Main.qml for our demo app. It draws a page header, a status label, and a button that calls into Python:
import QtQuick 2.7
import Lomiri.Components 1.3
import io.thp.pyotherside 1.4
MainView {
id: root
applicationName: "hello.surajyadav"
width: units.gu(45)
height: units.gu(75)
Page {
header: PageHeader {
id: pageHeader
title: i18n.tr("Hello")
}
Column {
anchors {
top: pageHeader.bottom
left: parent.left
right: parent.right
margins: units.gu(2)
}
spacing: units.gu(2)
Label {
id: greeting
width: parent.width
wrapMode: Text.WordWrap
text: i18n.tr("Press the button to call into Python.")
}
Button {
text: i18n.tr("Greet me")
onClicked: py.call("greeter.hello", ["Ubuntu Toucher"], function(result) {
greeting.text = result
})
}
}
}
Python {
id: py
Component.onCompleted: {
addImportPath(Qt.resolvedUrl("../backend/"))
importModule("greeter", function () {})
}
onError: console.log("PyOtherSide error: " + traceback)
}
}
Three details worth understanding:
units.gu()is the grid unit system. Screen sizes vary wildly across Lomiri devices, so spacings and sizes in grid units scale automatically. Hardcoded pixels break convergence.i18n.tr()wraps every user-visible string. Even if you do not plan translations on day one, doing this from the start saves a painful refactor later. My apps get community translations through this exact mechanism.- The
Pythonelement fromio.thp.pyothersideis your bridge.addImportPathpoints it at thebackend/folder inside the click package, andimportModuleloads it.
6. The Python Backend with PyOtherSide
PyOtherSide runs a real Python interpreter inside your app process. QML calls Python functions with py.call(), and Python can push events back to QML with pyotherside.send(). This is the same bridge my on-device AI app uses to stream LLM tokens into the UI without blocking it.
Create backend/greeter.py:
import platform
import pyotherside
def hello(name):
"""Called from QML with py.call(). Returns a string."""
release = platform.release()
return "Hello {0}! This string was built in Python on {1}.".format(name, release)
# Tell the QML side we finished loading
pyotherside.send("ready")
And on the QML side, react to the ready event with a Connections element:
Connections {
target: py
function onReady() {
console.log("Python backend is loaded")
}
}
The mental model that keeps me out of trouble: all Python runs on its own thread. Results come back to QML asynchronously through callbacks, and pyotherside.send() events arrive on the event loop. Never spin a blocking loop in a QML-called function if you want a responsive UI; for long jobs, run the work in a Python thread and emit progress events, exactly like a model download in utgpt reports its bytes-per-second.
One packaging note: the generated project already installs the backend/ directory into the click. If you add new top-level folders (data files, helper binaries), check the CMake install rules in the generated project so those files actually ship.
7. Desktop and Device Testing
You have two run targets, and you should use both.
Desktop
clickable desktop compiles your app and runs it as a window on your desktop. It is the fastest iteration loop, and for QML-only apps clickable desktop --qmllive reloads the UI on every file save without restarting Python. You can also force the system theme with --dark-mode or fake a language with --lang fr_FR to test translations.
Device
On the phone, enable Developer Mode in System Settings, connect the USB cable, and confirm the device shows up:
clickable devices # list attached devices and serials
clickable # build, install and launch (the default chain)
clickable logs # follow the app log on the device
clickable log # print the log once
clickable shell # open a terminal on the phone over ADB
Testing on hardware is not optional, in my experience. Edge-swipe gestures, the on-screen keyboard resizing your layout, landscape rotation, and suspend/resume behavior are exactly where mobile apps break, and none of them reproduce faithfully on the desktop.
8. AppArmor Permissions
Every Ubuntu Touch app runs inside an AppArmor sandbox. By default your app has no special access: no network, no user files, no system APIs. This is a feature. When I shipped utgpt, the "zero network permission" line in its profile was a selling point: the app physically cannot phone home.
You grant permissions in the apparmor file as JSON. A network-capable app looks like this:
{
"policy_groups": [
"networking",
"content_exchange",
"content_exchange_source"
],
"policy_version": 20.04
}
Common policy groups: networking for internet and sockets, audio for playback and recording, content_exchange to receive files shared from other apps, and content_exchange_source to share files outward. My Odoo timesheet app uses networking; the AI chat app uses none.
The rule of thumb: request the smallest set you need. Users and the OpenStore reviewers both notice over-permissioned apps, and unused permissions are the fastest way to lose trust on a platform where privacy is the whole point.
9. Publishing to the OpenStore
Time to ship. The OpenStore is the community app store for Ubuntu Touch. The flow is refreshingly simple compared to the walled gardens.
Before you submit
- Bump
versioninmanifest.json(semantic versioning, e.g. 1.0.0). - Run
clickable review. It checks your click package against the same rules the OpenStore's automatic review uses, before you upload anything. This catches missing icons, bad manifests, and permission problems early. - Make sure your app has a proper square icon. Include a PNG of at least 256px; it becomes the listing artwork.
- Write a real description. One or two honest paragraphs about what the app does and what permissions it needs.
Submit
Two paths, both fine:
- Web: log in at
open-store.io, use the Submit form with your app ID and your source repository URL. The OpenStore's build infrastructure compiles your click from the repo, so releases are reproducible. - Command line:
clickable publish "First release"builds and pushes the click for you once your app is registered.
Apps that fit the standard sandbox profile are reviewed automatically and typically go live within a day. If you need extra privileges (a background daemon, for example), the OpenStore admins review it manually through their community channels.
10. Pitfalls I Hit
Import versions are strict
Importing io.thp.pyotherside 1.5 fails on devices that ship 1.4, but importing 1.4 works everywhere that has 1.4 or newer. Import the lowest version that has the features you use. Same rule for Lomiri Components: 1.3 is the safe floor.
AppArmor denials look like mysterious crashes
If a Python call that touches the network or files silently dies, it is almost always a sandbox denial. Check the device syslog through clickable shell and add the missing policy group instead of guessing.
Desktop is not a phone
Layouts that look perfect in clickable desktop can overflow on a small phone screen once the keyboard opens. Use grid units, wrap labels with Text.WordWrap, and test on the target resolution with the on-screen keyboard up.
Do not fight the theme
Hardcoding colors breaks the moment a user runs SuruDark or a light theme. Pull colors from the theme or define both variants, like the dark/light palette pairs in my apps.
Ship small, then iterate
The best OpenStore apps I have seen started as one-screen utilities. Get version 1.0.0 published, collect real feedback from the community, then grow. The whole toolchain is built for fast iterations.
11. Where to Go Next
- Clickable docs: clickable-ut.dev covers every command, builder, and project config option.
- Ubuntu Touch developer docs: docs.ubports.com has the platform guides, and the official Lomiri App Development Level 1 & Level 2 courses walk through the same material in video form. I co-authored those courses, so if this article helped, the courses are the natural next step.
- Community: the UBports forum, the Telegram/Matrix groups, and the OpenStore's issue trackers. Questions get answered fast because the maintainers actually use the platform daily.
- My apps: browse utgpt's source, the Time Management repo, or the Tower Crash game as working references for everything covered here.
Ubuntu Touch rewards people who build. You will ship faster here than on any of the big platforms, your users will actually talk to you, and you will learn the Qt stack properly instead of gluing together vendor SDKs. Go make something.