1

I've read both the FAQ answer on the Wiki for Octave and this Stack Overflow post: How to load packages in Octave permanently? but apparently I'm still not grasping the meaning of the answers that were given. Questions abound...

  • if I want to make a package universally available upon program start-up for any user on my computer, is the Wiki saying I should edit the file "octaverc", which is read-only and immune to permission changes with chmod?
  • in order to change this file, do I need to download the dev package or am I supposed to go deeper and try to edit where Octave looks for its start-up commands to launch using a custom version of octaverc?
  • if I could edit the octaverc file, do I just add the line below the automatic load line?

I know this is nice and simple if I'm running Octave from the command line and want to load a package for one session's use only by typing "pkg load signal" at the Octave command prompt, but the end goal is to have it always available because I can't seem to load packages from within the new Octave GUI. If there's a way to do this instead, it would also do the trick.

An etiquette conundrum - I would have just commented on the previous Stack Overflow post linked above, but haven't got the necessary reputation around here...what's best practice?

Community
  • 1
  • 1
k.mat27
  • 163
  • 2
  • 8
  • It seems you're trying to edit the file `/etc/octaverc`, while there should be a local hidden file `~/.octaverc` in your home directory. If it doesn't exist, just create it. – Michael Apr 28 '17 at 03:58
  • that file would only affect the current user, and it appears he wants to know how to make that change for all users. – Nick J Apr 28 '17 at 06:41
  • 1
    Then edit /etc/octave.conf as root – Michael Apr 28 '17 at 08:59

1 Answers1

1

The file ~/.octaverc is user specific. If you want to make system-wide changes, change the system Octave configuration file. If you built Octave from source with default options, it can be one of the following files:

  • /usr/local/share/octave/site/m/startup/octaverc configuration file for all Octave in the system (with prefix /usr/local)
  • /usr/local/share/octave/4.0.3/m/startup/octaverc configuration file for Octave version 4.0.3
  • /usr/local/share/octave/4.2.1/m/startup/octaverc configuration file for Octave version 4.2.1

If you have installed from your package manager, the file will probably be somewhere in /etc/octave.conf which is then linked from /usr/share/octave/...

carandraug
  • 12,938
  • 1
  • 26
  • 38
  • Thanks to all - from the package manager, it was indeed in /etc/octave.conf so a sudo gvim edit was all that was in order. – k.mat27 Apr 28 '17 at 16:17