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 01 Nov 2013 04:46:11 PM UTC  
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 22 Feb 2015 01:35:48 AM UTC, 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 Member
Sun 19 Jan 2014 08:45:08 PM UTC, 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 19 Jan 2014 07:54:42 PM UTC, 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 06 Nov 2013 09:37:16 PM UTC, comment #2:

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

I'll investigate

Philip Nienhuis <philipnienhuis>
Project Member
Sat 02 Nov 2013 02:40:19 PM UTC, 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 01 Nov 2013 04:46:11 PM UTC, 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.

Items that depend on this one: None found


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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Feb 2015 01:35:48 AM UTCmtmillerSeverity2 - Minor=>1 - Wish
      StatusPatch Submitted=>Postponed
      Dependencies-=>Depends on bugs #36477
    Sun 19 Jan 2014 07:20:18 PM UTCmtmillerCategoryNone=>Configuration and Build System
    Sat 02 Nov 2013 02:40:19 PM UTCphilipnienhuisAttached File-=>Added octaverc_win_hist.cset, #29527
      StatusNone=>Patch Submitted

    Back to the top

    Powered by Savane 3.1-cleanup