Official website for Linux User & Developer
FOLLOW US ON:
Mar
16

Develop for the Nokia N900 and Maemo 5 OS!

by Kunal Deo

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 ‘run-standalone.sh’.

[sbox-FREMANTLE_X86: ~/codeEditor] > run-standalone.sh ./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.

magfan84

Pages: 1 2 3 4 5 6 7
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.
    • Ray McConaghy

      When I finally run the program (codeColor) I get the following error ( this is, however the latest SDK for Maemo5). Can you help?

      [sbox-FREMANTLE_X86: ~/codeColor] > run-standalone.sh ./codeColor
      codeColor[3820]: GLIB CRITICAL ** Gtk – gtk_widget_set_sensitive: assertion `GTK_IS_WIDGET (widget)’ failed

      Also, I got confused with the article… it asked me to create a directory called …/codeColor… but the prompt in your article showed you running in scratchbox in a directory …/codeEditor ( where did that come from?). I am a newbie so perhaps these are stupid questions!!

      Best regards

    • Ricardo

      I’m not able to access this full article, clicking the diferent page numbers or even directly loading the URL in my browsers always redirects to first page.

      Tested with Firefox 3.6.8 and Opera 10.61.

      Bug? Anyone else having the same problem?

    • Sean

      Same problem here, can’t get past page 1. Using IE 7 on Vista.

    • florian

      will not go past Page 1.
      it would be awesome if someone could fix this.Thanks.

      Florian, using maemo 5 browser

    • Russell Barnes

      Fixed – thanks for picking up on it.

    • http://nill ZIA

      living in CIS Russia . My question how to reinstall Maemo sofware 5 or latest without USB internet or bluetooth support (which not working in my N900 )? Is there any way how to reinstall this from flash memory card 2GB any support or download stand alone Exe File any software ? Thanks if you can reply my email waiting