Re: Do shell script vs terminal discrepancy
Re: Do shell script vs terminal discrepancy
- Subject: Re: Do shell script vs terminal discrepancy
- From: Paul Scott <email@hidden>
- Date: Fri, 04 Dec 2009 17:44:34 -0800
That is correct.
Caveats: 1) Your script must run (either directly or indirectly) from
your GUI login environment (normally it will); 2) after you change
environment.plist you need to log out and then log in again for the
changes to take effect; 3) If you run a shell that invokes it's .rc or
.profile to override the PATH environment variable, you should take
appropriate steps.
Paul
Paul Skinner wrote:
Paul,
Can you clarify that path? Do you mean save this to...
~/.MacOSX/environment.plist
Thanks,
Paul
On Dec 4, 2009, at 8:13 PM, Paul Scott wrote:
Perhaps this might work. Install this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>MAGICK_HOME</key>
<string>/opt/local/bin/</string>
<key>PATH</key>
<string>/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/paul/bin/:/Users/paul/.gem/ruby/1.8/bin
</string>
</dict>
</plist>
into .MacOSX/environment.plist in your home directory (note leading
period).
Paul Skinner wrote:
In Applescript:
do shell script "echo $PATH"
-->"/usr/bin:/bin:/usr/sbin:/sbin"
do shell script "which convert"
-->ERROR: The command exited with a non-zero status.
in terminal:
-bash-3.2$ echo $PATH;which convert
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/paul/bin/:/Users/paul/.gem/ruby/1.8/bin
/opt/local/bin/convert
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden