Hey! I finally received my Nokia N900 phone/toy/thing last week after almost 3 months of waiting; of course it’s full of awesomeness like every device one buys. For those of you who still don’t know what I’m talking about, this phone runs Nokia’s Maemo 5 OS which is essentially a Debian-based Linux distro with an adapted GUI.

Currently, the applications are mainly written using the GTK+ toolkit but the phone also provides QT 4.5/4.6 support. As QT will be the default toolkit for Maemo 6 (and for a lot of other cool reasons), it makes sense to develop new applications directly in QT.
I had some C++ and QT courses at school some years ago, I thought that it would be fun to pick it up again and try to develop a little application for the N900. This is the first article of a series explaining how to set-up an entire QT development environment for the N900 on Fedora, program a little “Hello World” application in QT, generate packages for this application and finally run it on the real phone.
Installing the Nokia N900 SDK
Note: Some months ago, Gerard Braad already wrote an article about installing the beta SDK on Fedora, but things have changed since then and not everything explained on his page still works (Gerard, if you are reading this, the comments on your site are also broken), this is more or less an updated and extended version of his article with my own experiences.
For convenience, we assume that the SDK will be installed on a 32-Bit Fedora 12 system with SELinux disabled (it installs files all over the place). It is possible to run the SDK on 64-Bit systems with some tweaking but it’s absolutely unsupported.
So, let’s start by installing the N900 SDK provided by Nokia…It’s available directly from their website and corresponds to the current 1.1 firmware (version 2.2009.51-1). Nokia provides a nice GUI installer for the SDK in form of a Python script. Unfortunately it is targeted at Debian/Ubuntu systems and won’t directly install on Fedora.
We need to change 2 lines in the maemo-sdk-install-wizard_5.0.py script for it to install on Fedora:
Line 2449: cmd += sb_installer_fn + opt + “-s ” + SB_PATH
Line 2504: cmd += “%s -d -m %s -s %s” % (sdk_installer_fn, self.__sdk_inst_m_opt_arg, SB_PATH)
Alternatively, you can directly download a modified script from here if you trust me
. We also need to install some packages with yum so satisfy dependences in the installer and later for development:
$ su -
# yum install kernel-(PAE if you have it)-devel gcc-c++ PyQt4 Xephyr
# chmod +x maemo-sdk-install-wizard_5.0.py
# ./maemo-sdk-install-wizard_5.0.py
The installer should start. Select a custom installation, then it’s a matter of clicking “next” a couple of times and wait for it to download and install all the required files…
When the installation ends, you will have a complete N900 emulator and compilation environment installed in /scratchbox and two icons on your desktop to launch the N900 emulator and access the online SDK documenttion. If you try to run the emulator now, it will fail…we have to do some further changes.
Edit /usr/local/bin/start_xephyr.sh and remove the “-kb” option from the Xephyr startup script, then run “/scratchbox/sbin/sbox_ctl start” as root or put this line in your /etc/rc.local file to have scratchbox startup automatically at boot time.
Now you should be able to run the N900 emulator by clicking the “Maemo 5 SDK” icon on your desktop…
At this point, you are pretty much up and running with a basic N900 emulator! In the next article, we are going to install QT 4.6 in the emulator, add some repositories and launch our first QT program!


Thanks for the information. If you have issues with the Maemo OS and SDK, please post them on the Maemo forum. For the SDK I have a posting at: http://talk.maemo.org/showthread.php?p=386373#post386373
Hey thanks, I tried to post the new lines to modify in the installer script on your blog, but te OpenID authentication didn’t let me use my fedora account. Maybe it’s fixed now…or not :p
It would be an issue on the end of blogger. I am considering to move away… but didn’t have the time to do this.
Could you post the changed lines on the forum… this would be highly appreciated; Jebba also posted his changes from http://wiki.maemo.org/User:Jebba/SDK on the forum. Perhaps even file it as a bug: https://bugs.maemo.org/show_bug.cgi?id=3986. It is currently a WONTFIX :-S
a very nice tutorial, can you please suggest some IDE to use with the SDK, i used a virtual image of Ubuntu on my Windows, it came with ESbox which really made it easy to develop and deploy apps.
regards
I’m using QT Creator in association with MADDE (http://wiki.maemo.org/MADDE). I had the same question as you, there is almost a too wide variety of options
hmm guys a little help here, am getting this error when trying to install:
QGtkStyle was unable to detect the current GTK+ theme.
Qt: Session management error: None of the authentication protocols specified are supported
Traceback (most recent call last):
File “./maemo-sdk-install-wizard_5.0.py”, line 3765, in
main()
File “./maemo-sdk-install-wizard_5.0.py”, line 3754, in main
wizard = InstallWizard()
File “./maemo-sdk-install-wizard_5.0.py”, line 3655, in __init__
self.setPage(PageIdNokiaBins, NokiaBinsPage())
File “./maemo-sdk-install-wizard_5.0.py”, line 1769, in __init__
“toggled(bool)”)
TypeError: QWizardPage.registerField(QString, QWidget, str property=None, SIGNAL() changedSignal=0): argument 4 has unexpected type ‘str’
QProcess: Destroyed while process is still running.
ok i’ve managed to get further ahead from these errors, i now see the install screen and setting the options i get to make it run too but it fails when trying to install scratchbox, can you please help me with this???
i can see this line in the installer :
Scratchbox cannot be used under Security Enchanced Linux (SELinux).
i can email u the log if u want me to, please help me out!!!!
Yes that’s “normal”. You need to disable SELinux to be able to use the SDK. System > Admin > SELinux Management. Click on disable and reboot your computer.
Ali,how did you get past those errors?