Path: utzoo!attcan!uunet!decwrl!sgi!shinobu!odin!socrates.esd.sgi.com!eva From: eva@socrates.esd.sgi.com (Eva Manolis) Newsgroups: comp.sys.sgi Subject: Re: stdin under Workspace Message-ID: <1990Oct25.170507.17590@odin.corp.sgi.com> Date: 25 Oct 90 17:05:07 GMT References: <2260@bnlux0.bnl.gov> Sender: news@odin.corp.sgi.com (Net News) Reply-To: eva@socrates.esd.sgi.com (Eva Manolis) Organization: Silicon Graphics, Entry Systems Division Lines: 42 In article <2260@bnlux0.bnl.gov>, bstewart@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@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@sgi.com