help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem setting PATH environment


From: c.
Subject: Re: Problem setting PATH environment
Date: Mon, 13 Aug 2012 09:14:31 +0200

Jonathan,

Please place your answers below previous comments, we prefer this style on this 
mailing 
list as it allows others who start reading later to follow better the 
discussion.


> On 13/08/2012 00:10, Jordi GutiƩrrez Hermoso wrote:
>> On 12 August 2012 10:07, Jonathan Williams <address@hidden> wrote:
>>> Have just installed Octave 3.6.2 on OS-X 10.6.8 using Homebrew package
>>> manager.  Seem to be having trouble setting the PATH environment at startup.
>> Can you explain more clearly how it seems to be having this trouble?
>> What are you seeing, exactly?
>> 
>>> I then checked that the path existed before exiting, thinking it would be
>>> established by .octaverc thereafter.
>> What does your .octaverc look like now?
>> 
>> - Jordi G. H.

On 13 Aug 2012, at 08:47, Jonathan Williams wrote:
> Thanks Jordi for your reply.
> 
> After I run the ADDPATH command, I can  run PATH and see that the additional 
> path has indeed been added.  The problem seems to be that the added path is 
> not saved by SAVEPATH, because I find that after I exit and relaunch, the 
> PATH has reverted to default.

Can you show exactly what command you used to add a new directory to the path?
Did you use relative or absolute path names?

> You ask what the .octaverc looks like, but I am not able to say with 
> certainly because there seem to be several copies of .octaverc in different 
> directories.  I had assumed (down to my ignorance) that there should only be 
> the one in the startup directory, but this has no path information.  Should 
> there be different copies, and if so where do I find the copy of .octaverc 
> which should contain path information?

you probably do have a couple of file named "octaverc" in the Octave install 
tree (under /share/octave/<version>/m/startup/octaverc and 
./share/octave/site/m/startup/octaverc) but you should have
only one named ".octaverc" in your home directory. Notice the dot at the 
beginning of the file name, this will make the file invisible in Finder, you 
will have to use the terminal to show the file.

As an experiment, try typing the following from within Octave:

system ("cat ~/.octaverc")
addpath (canonicalize_file_name ("/tmp"))
system ("cat ~/.octaverc")
savepath
system ("cat ~/.octaverc")

Below is what I see on my system, what do you see on yours?

>> system ("cat ~/.octaverc") ## initial contents of the file, yours might 
>> differ
page_screen_output (0);
print_empty_dimensions (0);
crash_dumps_octave_core(0);
edit editor "open -a /Applications/Aquamacs.app %s &"
ans = 0

>> addpath (canonicalize_file_name ("/tmp"))

>> system ("cat ~/.octaverc") ## the file is unchanged until I invoke savepath
page_screen_output (0);
print_empty_dimensions (0);
crash_dumps_octave_core(0);
edit editor "open -a /Applications/Aquamacs.app %s &"
ans = 0

>> savepath 
warning: savepath: current path saved to ~/.octaverc

>> system ("cat ~/.octaverc") ## now the file has changed
page_screen_output (0);
print_empty_dimensions (0);
crash_dumps_octave_core(0);
edit editor "open -a /Applications/Aquamacs.app %s &"
## Begin savepath auto-created section, do not edit
  addpath ('/private/tmp', '-begin');
## End savepath auto-created section
ans = 0
>> 

> Best regards
> Jonathan


HTH,
c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]