phindowing into target.

I have one target QNX box with two users. I have 2 windows box with Momentics IDE which connects to the target QNX box. The windows box also connects to target QNX box using phindows, so that when we are working with Windows box to create PhAB stuff and run it we can just phindow in to the target to see how the application looks. But when I phindow into the target box and login as one user I can not see the application. Basically what I want is both windows box phindowing to the same QNX target box using different logins to get their own Photon session which is connected to the IDE.

I know I can use “phindows -n/dev/photon” command to share the current photon session but in this case both windows box is sharing the same photon session.
Any suggestion?
Thanks in advance.

What do you mean by I can not see the application?

There are different Devices, check your env what device you try running your app on


i think there could be different Displaydevices you try to run your app in.
But like mario says, some more info would be nice :slight_smile:
(Is the process running? ps -A | grep yourApp, or similar)
(Is it actually realizing in Photon? Is it drawing into another DisplayDevice maybe?)
[btw. is this even possible with photon to draw in other displayDevices? with X.Org or XFree it works fine, so i guess photon too)

DISPLAY=… Is an X concept and not used by Photon. It’s actually PHOTON=… and it doesn’t take an IP address but rather a path (/dev/ph…)

Depending on which version of phrelay/phindows you have image in share memory (PgContext ) may not be displayed by phindows.

Or you application may not have the photon device hardcoded ( /dev/photon) which would be strange…

what I mean by “can’t see the application” is that once the phab HMI is launched from the IDE to the target I should be able to see that HMI by phindowing to the the target but I don’t see it. The hmi application process is running and when I actually go to the target box (instead of phindowing) the application is showing on the screen. But when I phindow and login as different user I guess I am in different photon session. How can I tell the IDE to launch the phab application is the photon session that I want?


Ah now it’s clear. When you launch phindows, it is starting a private photon session. You can start multiple phindows sessions at the same time and each of them will run a private session. To get phindows to attach to an already running session you need to use the -n option of Phindows. phindows -n /dev/photon (/dev/photon is the name of the local session). I don’t know how to tell the IDE to use -n … But just create your own shortcut to phindows and customize it.

My original question is how I can tell the IDE to launch its download (phab application) to a private photon session so that all my developers can share one QNX target and have their own private photon session that they can work on with out disturbing others. Because if I use –n option everyone is sharing and looking at the same photon session and potentially be fighting over to control that photon session :slight_smile:

Also where is the private photon session located? /dev/photon is the main session but where are the private sessions? /dev/photon2 ?

Ok I see in the /dev directory it creates it’s private photon sessino with phxxxxxx where xxxxxxx is a random number generated when private session is created. And when I set the PHOTON environment in IDE it will launch the app to that photon session. So everything is working except that I don’t like that fact that the path to the private photon session is automatically generated. Is there a way I can set the name of the private session so that I don’t have to change the PHOTON environment everytime?
I know that “phindows -n/dev/ph+” will generate /dev/ph but the doc says it only works in qnx4 and not in 6.3.
any ideas?

A local photon by default gets the name /dev/photon, other session will get /dev/ph… I’m not sure the number is randow though ;-)

I might be possible force a name by fiddling with the ph script. Maybe there is cleaner way but I don’t know.

the number seems like the pid of phrelay. Hmmmm
Thanks anyways mario.

Why don’t you simply mount your windows driver on your target, and run the application from within a private phindows session?
If you need to debug it, you can launch it held with on -h myapp and then attach with the IDE debugger.

sounds good, but can you explain more on mounting a windows driver on to my target?
How can I do this? are you talking about samba?
I would appreciate if you can tell me how this can be done.


Interesting situation, if the source is version controlled maybe this problem would not arise, if there are couple of windows machines trying to phindows to a target , i wonder if the photon application running is accessing a port or a external device could create problems if there were several version of photons running, and trying to access the same device ?

Jinma, you just mount your windows shares with fs-cifs, then you can run your applications directly rather than having the IDE download them.


thanks a bunch~
I’ll give it a try.