using Ptty or PtTerminal

would like to execute a system command ( int system( const char *command )), and see the output of this in a Ptty or
PtTerminal window in a photon application.
Currently, when i execute the system command, i cannot seem to see the output in the Ptty window, but i can see it
happening in the terminal window from where i executed the application.

For Instance:

system("ls -l");
PtSetArg( &FlagArgs, Pt_ARG_TTY_CMD, NULL, 0 );
PtSetResources( ABW_PtTtyDisplay, 1, &FlagArgs );

is what i am trying to do…any suggestions?

There is a nice example in th PtTty documentation

or try “use pterm” to get some information.