$PATH

David Bovill david at vaudevillecourt.tv
Wed Jan 26 04:09:23 EST 2011


Yes - but does it return the same $PATH even after you have customised your
personal user $PATH with entries in .profile or one of the many other files
that you can customise yourself, or that installers of command line tools
often cutomise for you (for instance MacPorts).

Even in MC days on Linux, I found that my own personal shell value of $PATH
was not the same as the MC result that gets returned with $PATH. I doubt
this is any different on Fedora Core?

For instance on my OSX system: I can use shell commands because my $PATH in
the default bash shell is:

/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>

In LiveCode $PATH (and therefore which command line tools are found) is
simply:

/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin

This is because my .profile settings are:

> # MacPorts Installer addition on 2009-05-28_at_01:12:13: adding an
> appropriate PATH variable for use with MacPorts.
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> # Finished adapting your PATH environment variable for use with MacPorts.
>
>
> # MacPorts Installer addition on 2009-05-28_at_01:12:13: adding an
> appropriate MANPATH variable for use with MacPorts.
> export MANPATH=/opt/local/share/man:$MANPATH
> # Finished adapting your MANPATH environment variable for use with
> MacPorts.
>
>
> ##
> # Your previous /Users/david/.profile file was backed up as
> /Users/david/.profile.macports-saved_2009-08-28_at_23:30:02
> ##
>
> # MacPorts Installer addition on 2009-08-28_at_23:30:02: adding an
> appropriate PATH variable for use with MacPorts.
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> # Finished adapting your PATH environment variable for use with MacPorts.
>

Somewhere around I have code that would read and write to these files in
order to keep the shell environments in LiveCode and the terminal in sync -
and I need to get this right for the tools I'm working on for LiveCode TV
shared code libraries, as they interface with various command line tools.
Need to get to the bottom of these issues cross platform.

On 26 January 2011 01:14, Mark Wieder <mwieder at ahsoftware.net> wrote:

>
> > AFAIK - the way $PATH works (at least on OSX / Linux) is not the same as
> you
> > get when you open your terminal... essentially because it is not using
> your
> > .profile or equivalent settings when the shell is initiated. I am not
> sure
> > where it gets it's initial setting?
>
> $PATH returns my path on Fedora Core. So does
>
> put shell("$PATH")
>



More information about the use-livecode mailing list