×
Namespaces

Variants
Actions

Qt MeeGo netbook 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 netbook version

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

usernameMeeGo1@ubuntu104:~$ sudo tar jxvf meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.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-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729

The next part is to load the script use to mount the virtual drives and allow starting of MeeGo SDK.

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

usernameMeeGo1@ubuntu104:~$ chmod +x meego-sdk-chroot

Configuring and running the MeeGo SDK

The commands above are only carried out once. These commands however 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 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

Configuring the MeeGo netbook image

These commands are done once on installation

$ # Move the image to top level
$ cd meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729
$ sudo mv ./meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.raw ../meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.raw
$ # Go back to top level
$ cd ..
$ # change protection to read write to allow mounting
$ sudo chmod 666 meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.raw
$ # Create the mount point
$ sudo mkdir /opt/meego-netbook
[sudo] password for usernameMeeGo1:


Mounting the MeeGo netbook SDK image

These two commands must be used every time the MeeGo emulator is started

$ # mount the netbook image
$ sudo mount -o loop,offset=512 ./meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.raw /opt/meego-netbook
$ sudo ./meego-sdk-chroot /opt/meego-netbook

When the correct password has been entered. The output similar to below will be appear.

mount --bind /proc /opt/meego-netbook/proc
mount --bind /sys /opt/meego-netbook/sys
mount --bind /dev /opt/meego-netbook/dev
mount --bind /dev/pts /opt/meego-netbook/dev/pts
mount --bind /tmp /opt/meego-netbook/tmp
mount --bind /var/lib/dbus /opt/meego-netbook/var/lib/dbus
mount --bind /var/run/dbus /opt/meego-netbook/var/run/dbus
cp /etc/resolv.conf /opt/meego-netbook/etc/resolv.conf
root@meego-netbook-sdk: /#


Note how the prompt has changed indicating the meego-SDK is in use commands go to the meego-SDK instead of the Ubuntu bash commands. 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.

root@meego-netbook-sdk:/# export DISPLAY=:2
root@meego-netbook-sdk:/# startmeego &
# start Qt Creator 1.38
root@meego-netbook-sdk:/# DISPLAY=:2 qtcreator

The MeeGo Simulator starts after a few seconds. Press enter several times to get the prompt back. The Qt Creator is started using the command below this specifies the screen to output to ":2" and when completed a couple of mouse clicks in the bottom right corner of window will bring the picture of Qt Creator to the front. For some unknown reason the text appears at approximately four times the normal size. Click the "x" in to right hand to remove the help box covering the screen. Select the "Animated tiles" example and from the command menu "Build" and "Build All". Select the "Compile Output (4)" window and when complete. Click the "Run" icon on the left.

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 finalised 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-netbook-sdk:/# startmeego-debug   # The "&" spawn is not used so all output comes to terminal screen


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 Meego Wiki.

Jim Gilmour 1-Aug-2010
major update for MeeGo netbook SDK 8-Aug-2010

This page was last modified on 13 November 2012, at 07:04.
69 page views in the last 30 days.