Menu

#4 Put nuSolve (and vgosdbMake, Calc, Proclogs) settings in user home dir?

1.0
open
None
2020-12-02
2020-09-03
No

nuSolve and related programs allow specifying user-localised settings (such as analysis center, analyst name, default cable sign etc.). This is all very nice, but running the GUI guide to one specific parameter can feel too much. It would be simpler if one could directly edit a config file with the localised values. Also, it is not obvious to me where in the system nuSolve stores these settings. It is common linux practice (at least I think it is) to use hidden files in the home directory for such configuration files. Possibly within a hidden directory, if many config files are to be saved. For example, there is the ".bashrc" for localised bash settings. There is ".ssh" folder wherein localised SSH settings live. I think it would be nice if nuSolve (and the related programmes) could store their settings in a similar way. For example in a ".nusolve" file, or directory. It would be nice if the settings file where readable (e.g. JSON). The GUI guide to change them (option -w) could still be the same, just that it writes the config to the file in the homedir. And, that one could edit these files directly instead of using the GUI, if needed. I think this would be nice, and more similar to how other linux programmes store their settings.

Discussion

  • Sergei Bolotin

    Sergei Bolotin - 2020-11-19

    nuSolve (as well as other utilities) uses Qt's QSettings class. Qt stores the settings in ~/.config directory (~/.config/NASA GSFC/ for nuSolve and other utilities). However, the specifications of these files are not documented -- the applications have GUI to modify configuration by a user, so I feel free to change variable names and meanings of the assigned values.

     
  • Eskil Varenius

    Eskil Varenius - 2020-11-30

    Aha! This is excellent. I think that perhaps this config location should be mentioned in the documentation if not already (if so I missed it).

     
    • Sergei Bolotin

      Sergei Bolotin - 2020-12-02

      Eskil, nuSolve uses tools that are provided by Qt, it cannot control the implementation. There is a chance that directory or file format could change in the future. That is why it is not documented in the user guide. Well, in general, nuSolve is a GUI application, therefore all configurations are made through GUI. Yes, sometimes a user needs to change many parameters to make some specific task -- to simplify it he/she can use an alternate config ("-a" option). In a script mode it is possible to alter everything too. So, to edit a file from ~/.config is ok, but it is "undocumented feature".

       

Log in to post a comment.