stdin under Workspace

Eva Manolis eva at socrates.esd.sgi.com
Fri Oct 26 03:05:07 AEST 1990


In article <2260 at bnlux0.bnl.gov>, bstewart at bnlux0.bnl.gov (Bruce Stewart) writes:
|> I have just joined the world of 4D series, and have a problem with
|> my graphics application software. I use the texport as dialog area; all
|> works well when I run the application by typing the command to
|> Irix in a shell. But when I start the application from Workspace,
|> all attempts at scanf on stdin return EOF, without giving me a
|> chance to type anything in the textport. I have already noticed
|> that the console icon must be opened prior to starting the
|> application from Workspace. What else am I missing?
|> 
|> Any clues would be appreciated.
|> 
|> bstewart at bnlux0.bnl.gov

The console is used by the WorkSpace for stdout and stderr (in case there
are any diagnostic or error messages that applications print)
but it is not intended to provide a textual I/O for applications.

You should run your application by launching a wsh and running from within.
To do this, you can either write a specific FTR for you application
(and then you can define an icon as well so it is distinguishable on the
 WorkSpace ), OR
you can use our predefined types for applications that need a terminal.

The generic type you'll probabl want to use (or mimic in your own ftr) is in 	
	/usr/lib/filetype/system/sgicmds.ftr,
and is called 
	TYPE ttyExecutable.
If you look at the ftr, you will see the OPEN rule ( the rule executed when
you double click on the icon) is :
	CMD OPEN winterm -c $LEADER $REST
winterm is a shell script that will start up a WINdowed TERMinal emulator
(by default wsh, but xterm can be used by setting an environment variable)
and run your application from the terminal emulator.
$LEADER and $REST are environment variables that are set to the selected files
by the WorkSpace.
See "Programming the IRIS WorkSpace" for more details.

Have fun,

--- The Giraffe Person at SGI......
    eva at sgi.com



More information about the Comp.sys.sgi mailing list