← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/logg] Rev 6372: Change search path of parameter file to ~/.fenics/dolfin_parameters.xml

 

On Mon, Oct 24, 2011 at 11:19:45AM +0200, Anders Logg wrote:
> On Mon, Oct 24, 2011 at 09:58:54AM +0100, Garth N. Wells wrote:
> > On 24 October 2011 09:38, Anders Logg <logg@xxxxxxxxx> wrote:
> > > On Mon, Oct 24, 2011 at 09:02:09AM +0100, Garth N. Wells wrote:
> > >>
> > >>
> > >> On 24 Oct 2011, at 08:25, noreply@xxxxxxxxxxxxx wrote:
> > >>
> > >> > ------------------------------------------------------------
> > >> > revno: 6372
> > >> > committer: Anders Logg <logg@xxxxxxxxx>
> > >> > branch nick: work
> > >> > timestamp: Mon 2011-10-24 09:23:52 +0200
> > >> > message:
> > >> >  Change search path of parameter file to ~/.fenics/dolfin_parameters.xml
> > >>
> > >>
> > >> Is this platform independent?
> > >
> > > Yes, at least as far as this is working:
> > >
> > > #ifdef _WIN32
> > >  std::string home_directory(std::getenv("USERPROFILE"));
> > >  parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml");
> > >  parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml.gz");
> > > #else
> > >  std::string home_directory(std::getenv("HOME"));
> > >  parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml");
> > >  parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml.gz");
> > > #endif
> > >
> > >> I would suggest using
> > >>
> > >>   ~/.local/fenics
> > >
> > > What is ~/.local? It doesn't seem to be a standard place to store
> > > config files. Another option is ~/.config which seems to be populated
> > > with config files from quite a few applications.
> > >
> >
> > Yes, .config would be better.
> >
> > I find programs that fill $HOME with hidden files and directories annoying.
>
> Yes.
>
> Does anyone know if .config is the recommended place to store config
> files these days?

This looks relevant:

  http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

According to this, we should have something like

  ~/.config/fenics/dolfin_parameters.xml
  ~/.local/share/fenics/cache

I'll change the first of these in DOLFIN. Then someone else might want
to think about this for Instant.

--
Anders


Follow ups

References