Re: vm cwd in *nix [message #54735] |
Thu, 05 July 2007 14:58  |
rclark
Messages: 12 Registered: September 1992
|
Junior Member |
|
|
In article <1183642210.113475.30670@q75g2000hsh.googlegroups.com>,
hradilv <hradilv@yahoo.com> wrote:
> On Jul 3, 6:33 pm, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
>> On Jul 3, 4:50 pm, rcl...@hindmost.lpl.arizona.edu (Richard Clark)
>> wrote:
>>
>>> Running it in normal fully interactive idl it works fine but not in
>>> vm. I figured out that this is because the vm comes up in the location
>>> of the .sav file as its current working directory.
>>
>>> Is there an easy way to notify the vm application of the location it
>>> is being started from without the user having to type in
>>> big_long_convoluted_path_name at some point?
>>
> ... the 'cwd' question. I
> too have run into this problem - with IDL changing directory to the
> directory where the .sav file is. For instance. Say the user want to
> start a .sav file to operate on some files in /da/mr/data/. He first
> does, > cd /da/mr/data then runs the program. But the program (the
> sav file) is in /usr/local/savfiles, so when the sav file tries to
> open foo.dat it can't find it.
Yes, the user has been prepositioned in a data directory. A script
fires off the idl -vm command, which includes the fixed path to the
.sav file. The vm session starts up in the directory where .sav file
is located, not the data directory where the idl command was issued to
the shell. When I start idl normally and RESTORE the .sav file and
run it, idl is running in the data directory where I want to be. And I
see that 'idl -rt=...' has the same behavior as the vm startup.
> To circumvent this, I usually wrap the thing in a (bash) shell
> script. I capture $PWD and export the variable, then call idl -vm=/
> usr/local/savfiles/foo.sav
This looks hopeful.
I also see that somewhere shortly after ver 6.0 they added a -args to
the idl command line and a command_line_arguments() function for use
within idl. If this works the way it sounds like, then it would be
just what I'm looking for. In fact, it would be one of the more useful
features they've added in years. Could greatly cut down on all the here
documents and cryptic sed and awk commands needed to generate batch
files. Gotta do some tests to see what's up.
> If anyone from ITT/IDL is out there listening... this used to not be a
> problem, until about v6.0 or maybe 6.1. Before that IDL would not
> have the current working directory as the directory from which idl was
> started. I for one liked it better that way. Maybe it's a limitation
> of the vm?
Nope, starting idl with the '-rt=' argument shows the same behavior.
Although maybe there are other ways of starting an application in rt
mode? This is the first I've done anything with the vm or rt modes of
running idl.
>>> And a related question...
>>
>>> Is there a way to automatically generate a mouse click to get past the
>>> vm startup screen? (again, this is all linux/unix so a non portable
>>> solution is ok)
>>
>> I believe the answer to that is to buy a runtime license.
> I'll agree (mostly) with Mike. The splash screen is there for a
> reason...
So it would seem. Well, at least they don't download ads to you while
you're running it.
Oops, did I say that out loud?
Richard Clark
rclark@lpl.arizona.edu
|
|
|