bugGNU Octave - Bugs: bug #40444, On Windows, config & history...


bug #40444: On Windows, config & history files etc. should go to %APPDATA%

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Fri Nov 1 16:46:11 2013  
Category: Configuration and Build SystemSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: PostponedAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Open
Release: devOperating System: Microsoft Windows

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sun Feb 22 01:35:48 2015, comment #5:

Agree with Philip's last comment, this should be solved the same way for both GUI and CLI. So this should probably depend on a new library routine that declares where configuration files and history files are stored. This routine should be callable for all operating systems and return the appropriate directory for Unixy systems (based on XDG_CONFIG_HOME) and for Windowsy systems (based on APPDATA).

Adding dependency on bug #36477.

Mike Miller <mtmiller>
Project Administrator
Sun Jan 19 20:45:08 2014, comment #4:

Yes, but for the CLI version of Octave this should also be adapted.

I think it had better be done in core sensu stricto Octave itself, not only in the GUI section.

Oh and I had no time (esp. at work, where I've hit this repeatedly in the past) to investigate further :-(

Philip Nienhuis <philipnienhuis>
Project Member
Sun Jan 19 19:54:42 2014, comment #3:

Concerning the configuration file, the default behavior of qt is to put the file into the "standard location" on each platform as described here: http://qt-project.org/doc/qt-4.8/qsettings.html#platform-specific-notes
Switching to this default behavior should not be very difficult.

Torsten <ttl>
Project Member
Wed Nov 6 21:37:16 2013, comment #2:

For some reason this patch doesn't work (anymore?)

I'll investigate

Philip Nienhuis <philipnienhuis>
Project Member
Sat Nov 2 14:40:19 2013, comment #1:

As regards the history file, this can easily be fixed in octaverc (main-rcfile), so I've prepared a changeset for that. (I've used a similar fix, with no error catching, for years at work)

Patching the Qt GUI setting files is beyond me :-(

(file #29527)

Philip Nienhuis <philipnienhuis>
Project Member
Fri Nov 1 16:46:11 2013, original submission:

Presently Octave writes config & history files to the "root" of the user profile, as customary on *nix.

From what I know, on Windows the root of the user profile is mainly used by the system and not really intended for users or user programs (although I haven't seen an official spec for this).
I'm not sure that the root of %USERPROFILE% is a good location at all; I repeatedly met problems with Octave's history file there that -perhaps! guessing...- could be related to this location (bug #40443).

On Windows systems, software settings etc. are supposed to go to program-specific subdirs in the "Application Data" subfolder in the user profile; it can be obtained by the environment string APPDATA.
E.g., 'getenv ("APPDATA")' on my fairly standard Win7 box gives
'C:\Users\Philip\Application Data\Roaming\Octave';
On a "plain vanilla" XP box it is:
'C:\Documents and Settings\{username}\Application Data'

I think it would be better if Octave on Windows systems complies to this.
FYI, AFAIK spaces in the path names don't matter for data files; spaces only induce problems when appearing in path names to executables and include files and the like. E.g., Octave happily handles scratch files in '%USERPROFILE%\Local Settings\Temp'

See also bug #36477 where analogous requests are made for *nix systems (freedesktop.org).

Philip Nienhuis <philipnienhuis>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #29527:  octaverc_win_hist.cset added by philipnienhuis (2kB - application/octet-stream)


   bug dependencies.

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by philipnienhuis (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Jun 7 11:35:45 2016lachlanDependencies-=>bugs #48095 is dependent
    Sun Feb 22 01:35:48 2015mtmillerSeverity2 - Minor=>1 - Wish
      StatusPatch Submitted=>Postponed
      Dependencies-=>Depends on bugs #36477
    Sun Jan 19 19:20:18 2014mtmillerCategoryNone=>Configuration and Build System
    Sat Nov 2 14:40:19 2013philipnienhuisAttached File-=>Added octaverc_win_hist.cset, #29527
      StatusNone=>Patch Submitted

    Back to the top

    Powered by Savane 3.1-cleanup1