The reward of a loooong journey

Those who know me, and probably also those who followed this blog in the past, will know that I’ve been working in the mobile phone area for a long time now. Even before my time at Canonical, which is about 2.5 years now, I’ve been working for Nokia on a mobile phone platform that unfortunately never saw the light of day. So in total I think I’ve been working for close to 5 years now on getting a phone out the door.

And today it happened! A friendly man from DHL rang the doorbell about 30 minutes ago, handing me over the reason why I’m overly excited right now:

Now this device is a gift for my dad, who did a lot in supporting my way to be a software engineer, so I won’t turn it on right now to not destroy the joy of the first time welcome bells and whistles for him. And anyways, you can find a lot of pictures and videos of Ubuntu Touch out there in the internet by now.

Posted in Ubuntu | 5 Comments

Unity8 windowed mode

I’ve received requests from people asking how to try the windowed mode on their unity8 enabled devices (yes phones too). Here’s how it works:
You need a phone or tablet, flashed with the devel-proposed channel. On a PC, running an up-to-date vivid and having unity8-desktop-session-mir installed should get you going. Get a terminal on the device somehow (ssh/adb/terminal app) and execute:

gsettings set com.canonical.Unity8 usage-mode Windowed

While this currently works on phones too, there’s the issue that the window’s title bar is hiding behind the panel so you can’t really drag the windows around. Start the gallery-app to get around that. On larger screens, the panel should allow you dragging windows from there too. Here’s some screenshots:

Windowed mode on Nexus 4

Windowed mode on Nexus 4

Windowed mode on Nexus 7

Windowed mode on Nexus 7

Windowed mode on a PC

Windowed mode on a PC

To get back to staged mode, do:

gsettings set com.canonical.Unity8 usage-mode Staged

Again, this is still an early work in progress, loads of stuff missing in windowed mode. The gsettings flag is considered temporary and experimental, it might disappear at any time. Also, we might disable windowed mode on form factors where it doesn’t really make sense, like on the Nexus 4 screenshot above.

Posted in Ubuntu | 11 Comments

WhereTheIssAt redone

A couple of weeks back, I did a talk about how extend your QML application with a Qt/C++ plugin for the Ubuntu App Developer Week. The focus of this talk was really on how to write the QML and C++ code to make it work and I didn’t really get into the build system. As that was a live example I took – what I thought was – the shortest path to get something that compiles the plugin and I just created a new project with the UbuntuSDK picking one of the old style templates. That created a qmake project, and I just hooked that up to the Ubuntu QML app template somehow.

Today however, our master of the SDK (namely Zoltan) told me that there is a much easier way already which also provides seamless integration with the rest of the Ubuntu tools like click packaging and directly running it on the phone. Apparently that would have been available already back then, but I missed it. So in order to avoid other people missing out on this too I’ve updated the WhereTheIssAt example to use that template.

Here’s a quick walk through:

With the latest SDK, create a new project and select “Ubuntu -> QML Extension Library + Tabbed UI”

Once you’ve got that ready, you can jump straight into adding the Qt/C++ code. What I did is to drop the “mytype.cpp” and readd the “iss.cpp” from the previous project. Obviously that involves a small change in the backend.cpp, replacing “MyType” with “Iss”, but that’s it. A quick copy/paste of the wheretheissat.qml file replacing the generated TabbedUi sample code later, the project was again ready to run:

The biggest advantage (besides you not having to fiddle with multiple project files) is that it gives you click packaging for free. This is another big step for the SDK and makes it much easier to extent your QML app with Qt/C++ code.

I’ve pushed the code again here

Happy hacking!

Posted in Ubuntu | Leave a comment

Ubuntu App Developer week

Yesterday I did a tutorial for the Ubuntu App Developer Week. The topic was “Extending QML Applications with Qt/C++ plugins”. If you’re interested in that topic but you’ve missed the session, you can watch it here:

You can find the example code used in the tutorial on Launchpad.

Today I’m going to do a session about using qmltestrunner to test your QML applications. You can watch it live at 15:00 UTC at If you can’t make it, this site will keep the video for you to watch it later.

Posted in Ubuntu | 3 Comments

Shine for Ubuntu Touch released

Hey ya, using the UbBloPoMo as an opportunity to let you know that Shine has been released to the Ubuntu Touch App store.

Here’s a couple of screenshots:

Grab the source code from:

I’ve tried to keep the ColorPickers as generic as possible (i.e. it doesn’t depend on other shine code at all), so if anyone needs a color picker, you’ll know where to find it!

EDIT: here’s a more generic description of what it actually is:

Happy hacking!

Posted in Ubuntu | 3 Comments

Little sneak previews

Recently I’ve been busy working on the right edge gesture in Ubuntu Touch. Here’s a little sneak preview:

Note that this is still work in progress and probably won’t hit the image really soon.

If you’ve been paying attention while watching the video you might have noticed that I used Ubuntu Touch to control my living room lighting. That is done with a set of Philips Hue Lightbulbs which I got end of last year and a soon to be released app called “Shine”, running on Ubuntu Touch, MeeGo and Desktops.

Stay tuned!

Posted in Ubuntu | 15 Comments

Ubuntu SSO on Touch

Hey folks, it’s time to cross another app off the list of applications to be created for Ubuntu Touch. If you’re still relying on Google Authenticator to log in to your Ubuntu SSO account, you’ll be happy to hear that you can use your Ubuntu phone for that now. Ubuntu Authenticator can be used for the two factor authentication for Ubuntu SSO and other OATH-TOTP compliant two factor auth sites. It also features easy configuration by scanning QR-Codes using the camera.

Only event based (counter) authentication tokens are supported at present. Mainly because I only use two factor authentication with Ubuntu SSO and didn’t spend the time to search for a timer based authentication. But hey, as usual the app is free and open source software; If you are interested in contributing support for the timer based auth method, let me know.

The app is submitted to the Ubuntu Store and pending review. It should be available for you to download soon.

Source code at:

Posted in Ubuntu | 3 Comments

car2go meets Ubuntu Touch

Back in the days when Nokia (RIP) shipped their first phone with Qt support, the good old N900, I created my first phone app. After having used this app for quite some years, having ported it to Symbian and later MeeGo, it finally reached its next platform, which is, of course, Ubuntu.

Apparently this is the first app in the Ubuntu Store which ships its own binary executable instead of being launched by qmlscene, so some hickups were to be expected. But Jamie did an awesome job fixing them all immediately and giving me some additional hints on how to improve packaging, so we managed to publish it today. Here it is, GetMeWheels for Ubuntu Touch. A car finder application for world’s most awesome car rental service, car2go.

Display a map with cars Show details for a car
Vie a list of all cars, sorted by distance Select your location

It’s also quite impressive for me to watch how the car2go service grew. I remember the first prototypes for it driving around here in Ulm. Later, at it’s launch, it was only Ulm and Austin where those little white-and-blue Smarts were to be seen. Now, 4 years later, you can just hop on a car and drop it off wherever you want in those cities: Wien, Vancouver, Toronto, Calgary, München, Ulm, Hamburg, Düsseldorf, Berlin, Köln, Stuttgart, Birmingham, London, Milano, Amsterdam, Denver, Minneapolis, Austin, San Diego, Washington DC, Portland, Miami and Seattle.

More information and source code here.

Posted in Ubuntu | 4 Comments

On manually creating click packages

After my last post, praising how easy it is to manually create click packages even if QtCreator doesn’t support that for compiled apps yet, I got requests from various people asking me to share the knowledge. So here is how I did it:

* Build your application for the arm architecture. You can either use a pbuilder environment to create a armhf.deb package and extract it again afterwards or just compile your stuff on the phone (or in an arm chroot). I won’t go into much details on this as I assume everyone writing a C++ app knows how to compile it. Compiling it directly on the phone might be the easiest way to get some binaries for now. Just copy the whole source tree to the phone and just use qmake/cmake and make as used from the desktop.

* Create a new directory and copy all the reqired binaries into that. Also copy QML files, .desktop file and application icon into that directory. In the end, everything required by your application should be in there. Don’t put any stuff in there that shouldn’t end up in the package (e.g. .cpp files, .moc files etc)

* Test running your application from within this directory. Your application should be able to start up from there, not requiring anything to be installed to /usr or similar. In case your C++ code loads QML files, it needs to find them relative to the binary’s location.

* Make sure the .desktop file’s Exec entry starts up the application from the local directory, e.g. calling it as “./myapp” instead of just “myapp”. Also make sure the icon filename is relative to the location of the .desktop file.

* now create a manifest.json. Here’s an example (from uFit) of what it should look like:

"description": "Ubuntu FitBit app",
"framework": "ubuntu-sdk-13.10",
"hooks": {
"ubuntu-fitbit-app": {
"apparmor": "ubuntu-fitbit-app.json",
"desktop": "ubuntu-fitbit-app.desktop"
"maintainer": "Michael Zanetti ",
"name": "com.ubuntu.developer.mzanetti.ubuntu-fitbit-app",
"title": "uFit",
"version": "0.1"

* Create <appname>.json file. This one is responsible to request permissions for certain capabilities at AppArmor. This step is the equivalent to the one described here:
Here’s the example of uFit:
"policy_groups": [
"policy_version": 1

Add any additionally required policy_groups as a comma separated list. Check out the above link for a list of possible values.

* We’re almost done. It’s time to create the package:
# click build <directory>

This should produce the click package ready to be uploaded in the current directory. But wait, you probably want to test it on your phone before actually uploading it, right? So here’s how you do that:

# sudo click install com.ubuntu.developer.<yourID>_<packagename>_<version>.click
# sudo click register --user=phablet com.ubuntu.developer.<yourID>_<packagename> <version>

Now you should be able to find the app by searching the Application lens and you should be able to run it from there. If it doesn’t start, get to a commandline and do this:

# tail -f /home/phablet/.cache/upstart/unity8.log

Watch the output that happens when you try launching the app. It should tell you what’s wrong with it.

Hope this helps!

Very useful tip from Colin in the comments:
You can install and register in one step by passing –user=phablet to click install, but it’s better to just use “pkcon install-local”.

Posted in Ubuntu | 7 Comments

uFit clicked!

A couple of months back, roughly the same time when the Ubuntu SDK alpha was announced I bought myself a fitbit to get back in shape after being hit by the lack of activity that can come along with a home office job. As I already wiped Android back then and started dogfooding Ubuntu Touch I quickly hacked together an app to track the status with Ubuntu Touch. The outcome of this is uFit, the Ubuntu fitbit app.


With the announcement that click packages for Ubuntu Touch can be uploaded and distributed through the application lens since the beginning of this week, I decided to get my hands on it. The first problem I faced was the fact that the Ubuntu SDK so far only supports packaging up pure QML/JS applications and the documentation for click packages so far only deals with it’s architecture and development rather than its usage. However, all my applications are mostly written in C++ with only a thin UI layer in QML. Still, I decided to give it a shot. uFit seemed simple enough for a start with only one QML plugin. It didn’t take long to find out that click packaging is one of the easiest packaging formats I came across so far. I love how simple it is to create a package. After uploading the package yesterday, I already received a notification today that the app has been published.

Long story short, as of today uFit can be downloaded to your Ubuntu Touch device directly from the application lens.

For those more curious, the source code can be found at


Posted in Ubuntu | Tagged , , | 10 Comments