comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Spawn and Parallels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Spawn and Parallels [message #62341] Fri, 05 September 2008 08:19
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Sep 5, 8:59 am, JMZawo...@gmail.com wrote:
> mankoff gets the gist of my problem. I'll need to read up on .terminal
> files before I can comment more on this suggestion but the concept
> seems plausible. I do, however, use the terminal for other reasons so,
> I'm not sure I want to rig up something that on the surface appears to
> be rather permanent. I could rename the file so that it is only
> called .terminal when I need it to execute. Fortunately, I do not need
> the pipe to do a series of writeu and readu commands. I just need to
> launch the program with the proper command line options and then open
> the output files it generated.

I believe he is only talking about the extension of a file, not
a .terminal hidden resource file, i.e. a file named myprogram.terminal
that is run only when you run it via "open myprogram.terminal".

> I'll let you all know how this works out.
>
> Another real solution for be if ITT came out with a real non-X11
> version native to the Mac (Cocoa). I won't wait for that though.

That would be great, but I wouldn't hold your breath.

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
Re: Spawn and Parallels [message #62342 is a reply to message #62341] Fri, 05 September 2008 07:59 Go to previous message
JMZawodny is currently offline  JMZawodny
Messages: 10
Registered: June 2007
Junior Member
mankoff gets the gist of my problem. I'll need to read up on .terminal
files before I can comment more on this suggestion but the concept
seems plausible. I do, however, use the terminal for other reasons so,
I'm not sure I want to rig up something that on the surface appears to
be rather permanent. I could rename the file so that it is only
called .terminal when I need it to execute. Fortunately, I do not need
the pipe to do a series of writeu and readu commands. I just need to
launch the program with the proper command line options and then open
the output files it generated.

I'll let you all know how this works out.

Another real solution for be if ITT came out with a real non-X11
version native to the Mac (Cocoa). I won't wait for that though.

Thanks to all. Joe


On Sep 5, 9:33 am, mankoff <mank...@gmail.com> wrote:
> On Sep 5, 9:24 am, pgri...@gmail.com wrote:
>
>
>
>> I am sorry I don't understand your problem... what's wrong with:
>
>> slanze-14: idl
>> IDL Version 6.3, Mac OS X (darwin i386 m32). (c) 2006, Research
>> Systems, Inc.
>> Installation number: XXXXX
>> Licensed for use by: YYYYYYYYYYY
>> IDL> spawn,'pwd'
>> /a/rom-48/vol/hea1/home/pgrigis
>
>> Doesn't this work in parallel?
>
>> Ciao,
>> Paolo
>
>> JMZawo...@gmail.com wrote:
>>> I have a Mac running both OS X and Windows XP at the same time via
>>> Parallels Desktop for Mac. I hate the way IDL works/looks/requiresX11
>>> under OS X so I run IDL in a virtual machine with Windows XP.
>>> Unfortunately, my current project requires that I SPAWN a process
>>> under OS X (windows version of the software is not available). So, my
>>> idea is to use SPAWN to launch terminal.app with the UNIT keyword and
>>> use WRITEU to send commands to run the unix program. I can get SPAWN
>>> to launch a terminal window under OS X, but I can't write a command
>>> via the unit without IDL reporting that the pipe is broken and the
>>> process being shut down. The terminal process does not terminate
>>> though. I had to use the NOSHELL keyword to get the terminal process
>>> to spawn.
>
>>> So, I'm looking for either a fix or an alternative way to launch a
>>> command line program on the unix side. Since I need to vary the
>>> parameters in the command line from call to call, the usual mechanisms
>>> that parallels uses to launch Mac apps from the virtual machine
>>> probably won't work to directly launch the program I need to run. I'm
>>> hoping that I'm just a little rusty with my unix skills and am missing
>>> an obvious solution.
>
>>> TIA, Joe
>
> Re Craig & Paolo: He is in Windows, so he cannot interact directly
> with Unix. But Parallels can associate applications between the
> operating systems, so he can have (minimal) control over Aqua
> applications, but not *nix apps. I use it (rarely) and it is a bit
> hard to understand what/how the OSes are interacting when it is
> happening in front of you.
>
> The AppleScript idea could definitely work though.
>
> And I propose a change to my original suggestion: Set up the terminal
> once, manually. Have it run a shell script and then exit. Then, rather
> than writing the .terminal file from IDL, just write the shell script
> unique/custom each time, and then launch the fixed .terminal file.
>
>    -k.
Re: Spawn and Parallels [message #62347 is a reply to message #62342] Fri, 05 September 2008 06:33 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Sep 5, 9:24 am, pgri...@gmail.com wrote:
> I am sorry I don't understand your problem... what's wrong with:
>
> slanze-14: idl
> IDL Version 6.3, Mac OS X (darwin i386 m32). (c) 2006, Research
> Systems, Inc.
> Installation number: XXXXX
> Licensed for use by: YYYYYYYYYYY
> IDL> spawn,'pwd'
> /a/rom-48/vol/hea1/home/pgrigis
>
> Doesn't this work in parallel?
>
> Ciao,
> Paolo
>
> JMZawo...@gmail.com wrote:
>> I have a Mac running both OS X and Windows XP at the same time via
>> Parallels Desktop for Mac. I hate the way IDL works/looks/requiresX11
>> under OS X so I run IDL in a virtual machine with Windows XP.
>> Unfortunately, my current project requires that I SPAWN a process
>> under OS X (windows version of the software is not available). So, my
>> idea is to use SPAWN to launch terminal.app with the UNIT keyword and
>> use WRITEU to send commands to run the unix program. I can get SPAWN
>> to launch a terminal window under OS X, but I can't write a command
>> via the unit without IDL reporting that the pipe is broken and the
>> process being shut down. The terminal process does not terminate
>> though. I had to use the NOSHELL keyword to get the terminal process
>> to spawn.
>
>> So, I'm looking for either a fix or an alternative way to launch a
>> command line program on the unix side. Since I need to vary the
>> parameters in the command line from call to call, the usual mechanisms
>> that parallels uses to launch Mac apps from the virtual machine
>> probably won't work to directly launch the program I need to run. I'm
>> hoping that I'm just a little rusty with my unix skills and am missing
>> an obvious solution.
>
>> TIA, Joe
>
>

Re Craig & Paolo: He is in Windows, so he cannot interact directly
with Unix. But Parallels can associate applications between the
operating systems, so he can have (minimal) control over Aqua
applications, but not *nix apps. I use it (rarely) and it is a bit
hard to understand what/how the OSes are interacting when it is
happening in front of you.

The AppleScript idea could definitely work though.

And I propose a change to my original suggestion: Set up the terminal
once, manually. Have it run a shell script and then exit. Then, rather
than writing the .terminal file from IDL, just write the shell script
unique/custom each time, and then launch the fixed .terminal file.

-k.
Re: Spawn and Parallels [message #62348 is a reply to message #62347] Fri, 05 September 2008 06:24 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
I am sorry I don't understand your problem... what's wrong with:

slanze-14: idl
IDL Version 6.3, Mac OS X (darwin i386 m32). (c) 2006, Research
Systems, Inc.
Installation number: XXXXX
Licensed for use by: YYYYYYYYYYY
IDL> spawn,'pwd'
/a/rom-48/vol/hea1/home/pgrigis

Doesn't this work in parallel?

Ciao,
Paolo



JMZawo...@gmail.com wrote:
> I have a Mac running both OS X and Windows XP at the same time via
> Parallels Desktop for Mac. I hate the way IDL works/looks/requiresX11
> under OS X so I run IDL in a virtual machine with Windows XP.
> Unfortunately, my current project requires that I SPAWN a process
> under OS X (windows version of the software is not available). So, my
> idea is to use SPAWN to launch terminal.app with the UNIT keyword and
> use WRITEU to send commands to run the unix program. I can get SPAWN
> to launch a terminal window under OS X, but I can't write a command
> via the unit without IDL reporting that the pipe is broken and the
> process being shut down. The terminal process does not terminate
> though. I had to use the NOSHELL keyword to get the terminal process
> to spawn.
>
> So, I'm looking for either a fix or an alternative way to launch a
> command line program on the unix side. Since I need to vary the
> parameters in the command line from call to call, the usual mechanisms
> that parallels uses to launch Mac apps from the virtual machine
> probably won't work to directly launch the program I need to run. I'm
> hoping that I'm just a little rusty with my unix skills and am missing
> an obvious solution.
>
> TIA, Joe
Re: Spawn and Parallels [message #62349 is a reply to message #62348] Fri, 05 September 2008 06:23 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
JMZawodny@gmail.com writes:
> I have a Mac running both OS X and Windows XP at the same time via
> Parallels Desktop for Mac. I hate the way IDL works/looks/requiresX11
> under OS X so I run IDL in a virtual machine with Windows XP.
> Unfortunately, my current project requires that I SPAWN a process
> under OS X (windows version of the software is not available). So, my
> idea is to use SPAWN to launch terminal.app with the UNIT keyword and
> use WRITEU to send commands to run the unix program. I can get SPAWN
> to launch a terminal window under OS X, but I can't write a command
> via the unit without IDL reporting that the pipe is broken and the
> process being shut down. The terminal process does not terminate
> though. I had to use the NOSHELL keyword to get the terminal process
> to spawn.
>
> So, I'm looking for either a fix or an alternative way to launch a
> command line program on the unix side. Since I need to vary the

I'm not sure why you need to launch a Terminal, couldn't you just
SPAWN it directly?

If not, could you use AppleScript commands ("osascript") in order to
remotely control Terminal?

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: cbmarkwardt+usenet@gmail.com
------------------------------------------------------------ --------------
Re: Spawn and Parallels [message #62350 is a reply to message #62349] Fri, 05 September 2008 05:36 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Sep 5, 8:26 am, JMZawo...@gmail.com wrote:
> I have a Mac running both OS X and Windows XP at the same time via
> Parallels Desktop for Mac. I hate the way IDL works/looks/requiresX11
> under OS X so I run IDL in a virtual machine with Windows XP.
> Unfortunately, my current project requires that I SPAWN a process
> under OS X (windows version of the software is not available). So, my
> idea is to use SPAWN to launch terminal.app with the UNIT keyword and
> use WRITEU to send commands to run the unix program. I can get SPAWN
> to launch a terminal window under OS X, but I can't write a command
> via the unit without IDL reporting that the pipe is broken and the
> process being shut down. The terminal process does not terminate
> though. I had to use the NOSHELL keyword to get the terminal process
> to spawn.
>
> So, I'm looking for either a fix or an alternative way to launch a
> command line program on the unix side. Since I need to vary the
> parameters in the command line from call to call, the usual mechanisms
> that parallels uses to launch Mac apps from the virtual machine
> probably won't work to directly launch the program I need to run. I'm
> hoping that I'm just a little rusty with my unix skills and am missing
> an obvious solution.
>
> TIA, Joe

I can't believe I'm going to support such a hack. If it is really just
aesthetics, isn't windows worse than X11?

I would do it this way: Write a ".terminal" file, then just 'open'
that. Terminal.app is associated with .terminal files and will launch,
run it, and I think can be set to automatically exit (at least the
Terminal window, probably not the whole Terminal.app).

Reverse engineer what you need to write in the .terminal file by
running some command you might want run in a terminal and then
choosing "Export Settings..."

-k.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Get paid daily to work at home.
Next Topic: weighting: irregular grid

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:17:36 PDT 2025

Total time taken to generate the page: 0.00743 seconds