Getting Started with the Trolltech Greenphone SDK

Everything you need to know to start programming for the cool new Greenphone.
Getting Ready

Loading the development environment is simple—run the installation program on Windows or Linux, respond affirmatively to the prompts, and within a minute you will have VMware and the SDK tools, application sources, documentation and binaries installed with an icon on your desktop to start things up.

This makes life really easy for reluctant developers using MS Windows to get into both embedded and desktop Linux and Qt application development.

At the time of this writing, developers using the x86 version of Macintosh OS X can use the Greenphone SDK under VMware Fusion, but they need to copy over the virtual machine's files from another installation; however, this may change by the time this article is published.

Getting Started Building Applications

Trolltech always ships its products with copious documentation and example code demonstrating all common features, and the Greenphone SDK is no exception. For starters, the “Developer Quickstart Guide” shows what needs to be done to build an application with a few one-liners.

First, we start the Qtopia emulator using the Qt Virtual Frame Buffer and a Greenphone skin by clicking on the runqvfb icon on our desktop. This is analogous to an X server for Qtopia, and it provides an exact pixel-for-pixel representation of the program running on the phone.

Then, we start the Qtopia phone environment by clicking the runqpe icon, which then connects to the qvfb process and displays its contents in its virtual screen.

Figure 2. qvfb Running with qpe Running in It

We need to run a script to set our QPEVER and PATH environment variables and to define some functions for communicating to the phone. If building for the x86 version of Qtopia, we would use:

. /opt/Qtopia/SDK/scripts/

Otherwise, if building for the actual Greenphone itself, we would choose the cross-compile environment with:

. /opt/Qtopia/SDK/scripts/

Then, we change to our directories and build:

cd ~/projects/application
qtopiamake -project && qtopiamake && make && gph -p -i

The qtopiamake program is Qtopia's version of the Qt qmake utility. It can generate a .PRO project file based on the contents of the current directory if given the -project parameter, but its most important job is to use the project file as the starting point to generate a Makefile based on the installed configuration of Qtopia and the type of build we want.

Typically, we generate a new .PRO and Makefile only when we have new files to add to our project, but qtopiamake takes so little time to execute that it is common to see it run from a standard shell script every time.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

reply this post

Anonymous's picture

Don't you understand that this is correct time to get the loans, which can make you dreams real.

hi i have a graduation

motsh's picture

i have a graduation project and i want to develop aprogram on green phone but i still need help please if any one has experience please email me

RIP Linux Greenphone

eosorio's picture


teia's picture

Is this phone available to buy for use as a regular phone? My contract is almost up and I want a Linux smartphone...

Great info. Thanks.

Weird Dude's picture

Great info. Thanks.

Beating the OpenMoko to It

Roy Schestowitz's picture

Thanks for a refreshing review (and a sigh of relief after Ty's take, which left room for doubt).