MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Using xtrace

The xtrace tool is an X server proxy that logs a human-readable trace of the X calls (done by X clients) and the X server replies. Use this tool to analyse difficult X-related problems, such as the order of X messages between multiple clients.

Packages

source: xtrace

binary: xtrace

Installing xtrace on the Harmattan device

Install xtrace through the developer mode applet.

Prerequisite: Developer mode must be enabled.

  1. Select Settings > Security > Developer mode.
  2. Install the Tracing bundle package by clicking Install.
  3. You get a notification screen that lists all the applications to be installed in the bundle package. To install, click OK.
  4. A dependency notice appears. Click Accept.

For more information on developer mode and installable tools, see Activating developer mode.

Using the tool

You can use the tool either on the Harmattan device or in Scratchbox.

Using the tool on the Harmattan device

You can run normal applications on the device directly with xtrace without tracing the whole X session:

  • Tell xtrace to ignore X authentication (with -n) and specify (with -D) a free socket port number for the proxy X server. Enter the following command:
xtrace -n -D :10 /usr/bin/widgetsgallery

Using the tool in Scratchbox

When non-X server unix socket file names contain the X display number, like in Scratchbox, you may need to run the whole UI session with the xtrace tool. Enter the following commands:

  
DISPLAY=:1 xtrace -D :2 -nk > ~/xtrace.log 2>&1 &
DISPLAY=:2 af-sb-init.sh start

Note: Tracing all X clients is problematic because the tool also produces a lot of information that you do not need. Thus, the output needs an X expert to analyse it.

Further information

For more information on the tools, see the following links: