Develop for the Nokia N900 and Maemo 5 OS!

Learn how to program the next-generation smartphone-come-internet tablet, the Nokia N900…

One great thing about qmake (and Qt) is that you can take the same code on Windows, Openmoko or wherever Qt is supported and run the same command and it will generate the makefiles compatible to that particular platform. This way you can run your applications on multiple platforms with minimal effort.

To compile the application, simply run the ‘make’ command. After successful compilation you should end up with an executable file called codeEditor.

10. Running the application on the N900 (Maemo) emulator
1. Run the Xephyr-based emulator by double-clicking the Maemo 5 SDK link on the desktop.
2. Set up the display number for the application that runs inside Scratchbox. Xephyr runs on display number 2 .

[sbox-FREMANTLE_X86: ~/codeEditor] > export DISPLAY=:2

3. Run the application using the script ‘’.

[sbox-FREMANTLE_X86: ~/codeEditor] > ./codeEditor

Xephyr is a KDrive-based X server which targets a window on a host X server as its framebuffer. Unlike Xnest, it supports modern X extensions (even if the host server doesn’t ) such as Composite, Damage and randr. It uses SHM images and shadow framebuffer updates to provide good performance. It also has a visual debugging mode for observing screen updates. It is used in many projects to emulate a device’s look and feel on a desktop when using traditional x86 binaries. Other usages include toolkit debugging, X server internal development and multi-terminal configurations.

Nokia N900 has killer hardware and Maemo provides the raw power of Debian. And when you mix Qt into this already impressive combination, you get awesome power to write cross-platform applications for both embedded platforms and desktop hardware. Qt is not only supported on Maemo, it also runs on other embedded platforms such as Openmoko, Windows Mobile and Symbian (which powers all of Nokia’s N-series smartphones). So you can develop for all these completely different devices using a single code base. How cool is that?

This article originally appeared in issue 84 of Linux User & Developer magazine.

Linux User & Developer, one of the nation’s favourite Linux and Open Source publications, is now part of the award winning Imagine Publishing family. Readers can subscribe and save more than 30% and receive our exclusive money back guarantee – click here to find out more.