Meego Wiki
Views

SDK/Docs/1.0/MeeGo SDK with Xephyr

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
Line 53: Line 53:
mount --bind /var/run/dbus /home/ell/meego-sdk-0524/var/run/dbus
mount --bind /var/run/dbus /home/ell/meego-sdk-0524/var/run/dbus
cp /etc/resolv.conf /home/ell/meego-sdk-0524/etc/resolv.conf
cp /etc/resolv.conf /home/ell/meego-sdk-0524/etc/resolv.conf
-
root@meego-netbook-sdk:/#
+
root@meego-handset-sdk:/#
</pre>
</pre>
 +
 +
This is now a ''MeeGo chroot terminal''.  It behaves just like a terminal running in the MeeGo OS:  paths, programs, libraries, and environment are all the same as those on a MeeGo OS netbook or handset.
Note: ''meego-sdk-chroot'' uses the ''chroot'' command.  Be sure it is in your path or create an alias:
Note: ''meego-sdk-chroot'' uses the ''chroot'' command.  Be sure it is in your path or create an alias:
  $ alias chroot='/usr/sbin/chroot'
  $ alias chroot='/usr/sbin/chroot'
</ol>
</ol>
-
=== Installing other software ===
 
-
It's possible to install software from the standard locations (at least it is in netbook images) into the chroot.
+
== Start the MeeGo UI in Xephyr ==
 +
<ol>
 +
<li>Set the DISPLAY environment variable</li>
 +
Xephyr does not see $DISPLAY env variable from host system since Xephyr is running in the MeeGo chroot terminal.  From the MeeGo chroot terminal, set the DISPLAY variable before running "startmeego" that calls Xephyr.
-
[[#Enter the MeeGo chroot environment | Enter the chroot]], then run:
+
# export DISPLAY=:0
-
zypper install <package>
+
<li>Launch Xephyr</li>
-
 
+
From inside the MeeGo chroot terminal:
-
It should also be possible to upgrade the whole MeeGo image using:
+
  # startmeego &
-
 
+
-
zypper dist-upgrade
+
-
 
+
-
=== Setting host display before running Simulator ===
+
-
 
+
-
Xephyr does not see DISPLAY env variable from host system since it is running as chroot.
+
-
As chroot, set DISPLAY variable before running "startmeego" that calls Xephyr.
+
-
 
+
-
export DISPLAY=:0
+
-
 
+
-
== Run the Simulator ==
+
-
 
+
-
From inside the chroot, '''as root''' do:
+
-
 
+
-
  startmeego &
+
This starts the Xephyr server then runs a script to boot the MeeGo desktop into it.
This starts the Xephyr server then runs a script to boot the MeeGo desktop into it.
-
Note: Currently, the simulator runs only on host systems with an Intel integrated graphics controller. It does not run with ATI or NVIDIA graphics controllers.
+
<li>Start your application in MeeGo UI</li>
-
 
+
Your MeeGo application can be built and run from the MeeGo chroot terminal.  By default, your application UI will display in a new window on your desktop.  To configure your application to show up inside the MeeGo UI in Xephyr, start your application as follows in the MeeGo chroot terminal:
-
If you want to run applications from the chroot and have them display in the Simulator window, you can do:
+
  # DISPLAY=:2 <your application>
-
 
+
-
  DISPLAY=:2 glxgears
+
-
 
+
-
(replacing ''glxgears'' with the command you want to run).
+
=== Debugging the Simulator ===
=== Debugging the Simulator ===
Line 111: Line 96:
           <td>[[File:qemu-netbook.jpg|thumb|MeeGo Netbook UI in QEMU]]</td>
           <td>[[File:qemu-netbook.jpg|thumb|MeeGo Netbook UI in QEMU]]</td>
</tr></table>
</tr></table>
 +
 +
 +
=== Installing other software ===
 +
You can install additional software into the MeeGo chroot environment.  From the MeeGo chroot terminal:
 +
 +
# zypper install <package>
 +
 +
You can also upgrade the whole MeeGo image using:
 +
 +
# zypper dist-upgrade
 +
Known issues:
Known issues:

Revision as of 20:07, 2 August 2010

The MeeGo SDK with Xephyr provides a development environment on Linux workstations for Netbook and Handheld applications.

Contents

Setup the MeeGo SDK with Xephyr

  1. Check for Intel graphics chipset
  2. $ lspci | grep VGA
    

    Desired output: 00:02.0 VGA compatible controller: Intel Corporation ...

    If your system does not have Intel graphics, see the other SDK options.

  3. Download the MeeGo SDK Image for your target as described on the Getting Started page.
  4. Install the meego-sdk-chroot script
  5. The meego-sdk-chroot script sets up mountpoints for the chroot environment, then starts the chroot proper; it also attempts to unmount everything when it exits and clear up any processes started in the chroot. Get it with:

    $ wget http://download3.meego.com/meego-sdk-chroot
    

    Make the chroot script executable:

    $ chmod +x ./meego-sdk-chroot
    
  6. Configure X on the host to allow Xephyr to access the display
  7. $ xhost +SI:localuser:<user name>
    

    Example for user named "bob":

    $ xhost +SI:localuser:bob
    

    (You need to do this once before running Xephyr or Qt Creator after each reboot)

  8. Mount and "Change root" into the MeeGo image
  9. Create a directory for the MeeGo image contents:

    $ mkdir <image destination directory>
    

    Mount the image into the directory:

    $ sudo mount -o loop,offset=512 <image file> <image destination directory>
    

    Change the root of the terminal to the MeeGo OS root:

    $ sudo ./meego-sdk-chroot <image destination directory>
    

    Example:

    $ sudo mkdir /opt/meego-handset
    $ sudo mount -o loop,offset=512 ./meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0721.raw /opt/meego-handset
    $ sudo ./meego-sdk-chroot /opt/meego-handset
    

    The output from running meego-sdk-chroot should look like this:

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

    This is now a MeeGo chroot terminal. It behaves just like a terminal running in the MeeGo OS: paths, programs, libraries, and environment are all the same as those on a MeeGo OS netbook or handset.

    Note: meego-sdk-chroot uses the chroot command. Be sure it is in your path or create an alias:

    $ alias chroot='/usr/sbin/chroot'
    

Start the MeeGo UI in Xephyr

  1. Set the DISPLAY environment variable
  2. Xephyr does not see $DISPLAY env variable from host system since Xephyr is running in the MeeGo chroot terminal. From the MeeGo chroot terminal, set the DISPLAY variable before running "startmeego" that calls Xephyr.

    # export DISPLAY=:0
    
  3. Launch Xephyr
  4. From inside the MeeGo chroot terminal:

    # startmeego &
    

    This starts the Xephyr server then runs a script to boot the MeeGo desktop into it.

  5. Start your application in MeeGo UI
  6. Your MeeGo application can be built and run from the MeeGo chroot terminal. By default, your application UI will display in a new window on your desktop. To configure your application to show up inside the MeeGo UI in Xephyr, start your application as follows in the MeeGo chroot terminal:

    # DISPLAY=:2 <your application>
    

    Debugging the Simulator

    If you are having issues with the Simulator, use the debug script to see what's happening:

    startmeego-debug
    

    This shows the console output from the script, which may give you some clues if it's not working correctly.

    Netbook UX in the Simulator

    Here's what it looks like:

    Simulator running netbook ux.png

    MeeGo Handset UI in QEMU
    MeeGo Netbook UI in QEMU


    Installing other software

    You can install additional software into the MeeGo chroot environment. From the MeeGo chroot terminal:

    # zypper install <package>
    

    You can also upgrade the whole MeeGo image using:

    # zypper dist-upgrade
    


    Known issues:

    • Panels which rely on DBus (like the battery, networking) don't report devices properly.

    Stop the Simulator

    To stop the Simulator, just exit the chroot shell with:

    exit
    

    This closes down any processes started inside the Simulator and unmounts directories used by the chroot environment. The output should look something like this:

    exit
    umount /home/ell/meego-sdk-0524/proc
    umount /home/ell/meego-sdk-0524/sys
    umount /home/ell/meego-sdk-0524/dev/pts
    umount /home/ell/meego-sdk-0524/dev
    umount /home/ell/meego-sdk-0524/tmp
    umount /home/ell/meego-sdk-0524/var/lib/dbus
    umount /home/ell/meego-sdk-0524/var/run/dbus
    

    Another language version of this page

Personal tools