Running a Photon program in a remote Photon session

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.