×
Namespaces

Variants
Actions

Qt MeeGo QtCreator138 SDK how to install and use on Linux Ubuntu 10.04 LTS

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: jimgilmour1 (07 Aug 2010)
Last edited: hamishwillee (13 Nov 2012)

Contents

Introduction

This is a forward looking article and as such many things could change. This article shows the similarity between the Nokia Qt SDK and Qt MeeGo. There are not any current (as of 7-Aug-2010) mobiles devices to test this on until 2011. There is a however the simulator. The Qt MeeGo Qt Creator is currently version 1.38+. The description of install of Ubuntu is beyond the scope of this article, however Windows PC users show first try the UbuntuOne Desktop solution which does not affect the Windows installation and boots from CD/DVD by creating a file on the Windows system. The author uses the Alternative disk download and boots from another disk.

Why upgrade to Ubuntu version 10.04?

Download Ubuntu 10.04 LTS for free and is a considerable improvement over previous versions and supports Nokia Qt SDK 1.0 and previous Maemo SDK's. The most important point is that the X server screen driver set up is the same as required for Nokia Qt SDK 1.0 off-line version. This latest version of Xephyr also removes the restriction of using being unable to use nVidia(tm) graphics cards with the Qt MeeGo SDK. This supports the latest version of Firefox and is the default web browser in which you can load many Firefox extensions.

Configuring the Ubuntu 10.04 Xserver-Xephyr

This is for Ubuntu 10.04 Linux 32 or later . Although not part of the Qt MeeGo this often causes problems for those with little experience of Linux systems. The way to do this is to install from Ubuntu launchpad website. The file to download is the xserver-xephyr i386.deb .

Clearly there are other Linux distributions equally as good as Ubuntu, however in this article the aim is to produce a common platform for Qt to use.

Installing the Qt MeeGo SDK

Before downloading the consider creating new account from Ubuntu file menu System -> Administration -> Users and groups if you are already using an account for Nokia Qt SDK or other applications, e.g yourname or usernameMeeGo1. This is because the Qt MeeGo SDK makes considerable additions to the user profile, add lots of variables and needs changes of protection which could leave problems, when removing the kit. When you have created the account remember to tick the box administrative rights account and give a strong password. The group name must be same as usernameMeeGo1 or your chosen username

Finding your Graphics card type under Ubuntu version 10.04

To find if you have a nVidia(tm) graphics card or another graphics card like Intel(tm) in Terminal window type

usernameMeeGo1@ubuntu104:~$ lspci |grep VGA
02:00.0 VGA compatible controller: nVidia Corporation G72 [GeForce 7500 LE] (rev a1)

In the above response there is a nVidia(tm) graphics card

Downloading the kit

There are two types of kit available :-

This article will focus on the older Qt Creator 1.38 compatible version

When downloaded you need to start a terminal from the Applications -> Accessories -> Terminal and execute the following commands


Download script from meego-sdk-chroot script. Make the script executable.

#the alternative is to use wget
usernameMeeGo1@ubuntu104:~$ wget http://download3.meego.com/meego-sdk-chroot
usernameMeeGo1@ubuntu104:~$ chmod +x meego-sdk-chroot
usernameMeeGo1@ubuntu104:~$ sudo mv meego-sdk-chroot /usr/bin
#download the MeeGo Qt Creator 1.38 compatible image
usernameMeeGo1@ubuntu104:~$ wget http://download3.meego.com/meego-sdk-0524.tar.bz2

Now unpack the the SDK

usernameMeeGo1@ubuntu104:~$ sudo tar jxvf meego-sdk-0524.tar.bz2

This is where the first problem occurs. The increased security in Ubuntu no longer need a user account "root", stopping other networks accessing you system. Therefore to use this archive the protection must be change to your username and group, this is the main reason we created another user account. In the default home account terminal window execute the following commands

usernameMeeGo1@ubuntu104:~$  #This will take a while depending on performance of your PC
usernameMeeGo1@ubuntu104:~$ sudo chown -hR usernameMeeGo1:usernameMeeGo1 meego-sdk-0524

Configure the X server display

#Configure X on the host machine to enable the Simulator to access the display of the normal user: 
xhost +SI:localuser:usernameMeeGo1
#Support nVidia and Intel video cards and possibly others...
Xephyr :2 -host-cursor -screen 1024x768x16 -dpi 192 -ac &
#Set up your X11 display using the :2 in Xephyr
export DISPLAY=:2


Mounting the MeeGo chroot SDK

These commands are needed every time you reboot or login to the usernameMeeGo1 account. This may be a good idea to copy the Xserver commands into a script and run this on login, into file for example meegostart.sh then chmod +x meegostart.sh, then this command is run as ./meegostart.sh

#Configure X on the host machine to enable the Simulator to access the display of the normal user: 
xhost +SI:localuser:usernameMeeGo1
#Support nVidia and Intel video cards and possibly others...
Xephyr :2 -host-cursor -screen 1024x768x16 -dpi 192 -ac &
#Set up your X11 display using the :2 in Xephyr
export DISPLAY=:2
$ # mount the root
$ sudo meego-sdk-chroot /home/usernameMeeGo1/meego-sdk-0524

The sudo command will prompt for password then a mount log will appear Note how the prompt has changed indicating the meego-SDK is in use. Commands go to the meego-SDK instead of the Ubuntu bash command shell. Earlier in this section the X Server was started and configured. The command "export DISPLAY=:2" is now given again as this is not accessible in the meego-SDK. The handset picture appears, click the four square buttons to start the main menu

root@meego-netbook-sdk:/# export DISPLAY=:2
root@meego-netbook-sdk:/# startmeego &

The MeeGo Simulator starts after a few seconds. Press enter several times to get the prompt back.

Starting Qt Creator 1.38

The command is given on the terminal

DISPLAY=:2 qtcreator

Wait for about 10 seconds and click the bottom right of the Xephyr window and the Qt Creator screen will appear. The response will be sluggish due the not having hardware accelerated graphics card

Stopping the MeeGo SDK

To stop the Simulator give the command exit

root@meego-netbook-sdk:/# exit

Importing working Qt Applications

The Qt projects can be imported from other operating systems by writing to a USB drives memory stick, a USB Expansion drive or a finalized data CD.

Troubleshooting

If this fails then check that the exported window is ":2" and not ":0". The command line "export DISPLAY=:0" fails and its not easy to see. There is a debug function which requires knowledge of X Server messages. If you get an error from "Xephyr" on starting about display missing or unable to lock files then reboot the PC because something is locked, possibly due to Xhost problems. If you don't like the window size change this in the Xephyr command line the first to numbers are screen size. The command "Xephyr --help" will give a help screen of all the parameters

root@meego-handset-sdk:/# startmeego-debug   # The "&" spawn is not used so all output comes to terminal screen

Slow response in MeeGo SDK emulator

The graphics card can be checked for hardware acceleration by typing the commands

usernameMeeGo1@ubuntu104:~$ sudo apt-get install mesa-utils
usernameMeeGo1@ubuntu104:~$ glxinfo | grep "renderer string"
OpenGL renderer string: Software Rasterizer
#remove package if you need to install QtOpengl as they are incompatible
sudo apt-get remove mesa-utils

In the case above the graphics card is using software rendering

Large Font in Qt Creator 1.38 Xephyr display

This seems to be a known problem that does not affect the application running. There is no obvious answer appears that font may not be available.

Related Links

Acknowledgements

This article may become the part of a future published book and the author Jim Gilmour gives permission for Nokia Developer Wiki to display this article and may also appear on the [1] Wiki.

Jim Gilmour 1-Aug-2010 rewritten from old version 7-Aug-2010

This page was last modified on 13 November 2012, at 07:06.
83 page views in the last 30 days.
×