Starting Photon applications

You can connect to a Photon session from a Windows or QNX Neutrino host machine and run your Photon program as if you were sitting in front of the target machine. Photon appears in a phindows window on your Windows host or in a phditto window on your QNX Neutrino host.

The remote Photon session runs independently of your host. For example, the clipboards don't interact, and you can't drag-and-drop files between the two machines. The phindows and phditto utilities transmit your mouse and keyboard input to Photon and show the resulting state of your Photon session as a bitmap on your host machine.

Before you run a remote Photon session on a Windows host, you must first prepare your target machine. For details, see the Connecting with Phindows section in the Preparing Your Target chapter.

To start a remote Photon session:

  1. In the Target Navigator view, right-click a target and select Launch Remote Photon.

Photon appears in a Phindows window.

You can start a Photon application you created in PhAB in exactly the same way that you launch any other program in the IDE. By default, the program opens in the target machine's main Photon session. (For more on launching, see the Launch Configurations Reference chapter in this guide.)

To run your Photon program in a remote Photon session window:

  1. In the remote Photon session, open a command window (e.g. a terminal from the shelf).
  2. In the command window, enter: echo $PHOTON

    The target returns the session, such as /dev/ph1470499. The number after ph is the process ID (PID).

  3. In the IDE, edit the launch configuration for your QNX Photon Appbuilder project.
  4. Select the Arguments tab.
  5. In the C/C++ Program Arguments field, enter -s followed by the value of $PHOTON. For example, enter -s /dev/ph1470499.
  6. Click Apply, then Run or Debug. Your remote Photon program opens in the phindows or phditto window on your host machine.
    Note: If you close and reopen a remote Photon session, you must update your launch configuration to reflect the new PID of the new session.
Related concepts
What is PhAB?
Using PhAB