[fpc-devel] GetAppConfigDir under Unices

dannym danny.milo at gmx.net
Fri Nov 4 17:39:46 CET 2005


Hi,

Am Freitag, den 04.11.2005, 17:26 +0100 schrieb Michael Van Canneyt:
> 
> On Fri, 4 Nov 2005, dannym wrote:
> 
> > Hi,
> >
> > Am Freitag, den 04.11.2005, 05:46 +0100 schrieb Michalis Kamburelis:
> >> Hi
> >>
> >> I just tested SysUtils.GetAppConfigDir under Linux and I see that it
> >> returns
> >>    GetHomeDir + ApplicationName
> >> (when Global = false). Shouldn't it rather return
> >>    GetHomeDir + '.' + ApplicationName
> >> ? Config directories in user's home dir traditionally start with '.' to
> >> be somewhat "hidden". I would expect GetAppConfigDir to follow this
> >> practice.
> >
> > actually by now it is (among others) GetHomeDir + '/.config/' +
> > ApplicationName, according to the Desktop Base Directory Spec
> >
> > "$XDG_CONFIG_HOME defines the base directory relative to which user
> > specific configuration files should be stored. If $XDG_CONFIG_HOME is
> > either not set or empty, a default equal to $HOME/.config should be
> > used."
> > http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
> >
> > I guess someone died the death of a thousand dotfiles, and figured that
> > it can't continue like that :)
> 
> Hm.
> Do you know a distro that uses this ?
> SuSE definitely doesn't. The .config directory doesn't even exist.

I doubt that that is dictated by a distro. The spec is pretty recent, so
I guess not many apps use it yet. However, 
- xfce 4.2 does use it
- the spec was written by a kde guy, and a quick search turned up
http://wiki.kde.org/tiki-index.php?page=Environment+Variables (not too
sure if they really use it, as I don't use kde)
- there are too many dotfiles in the way in $HOME :)

So, for new apps / new major versions, IMO adhering to the spec would be
a better idea. For minor revisions of existing apps, yes, no use in
breaking people's existing config files / making things break for them
when they downgrade the app again.

Note that gnome and kde use a different level of indirection
(.gnome2 / .kde) since ancient times, otherwise (everything directly in
$HOME) one would drown in a ocean of dotfiles already :)

> 
> Also, most existing apps don't adhere to this, but use the scheme as
> outlined in FPC. so..;
> 
> Michael.

cheers,
   Danny





More information about the fpc-devel mailing list