On Wed, Nov 5, 2014 at 8:57 AM, Richard Frith-Macdonald <
[email protected]> wrote:

> Yes, I'm not sure there's any reason to change the *default* directory
> layouts ... for many people putting everything in a single GNUstep
> subdirectory makes perfect sense, and no one config will please everyone.
> However, encouraging distributions (and other interested people) to
> contribute their own filesystem layout files for inclusion in gnustep-make
> seems good.


I would expect that freedesktop.org's solution is intended to avoid just
that -- having to patch or contribute to dozens of desktop environments,
toolkits and who-knows-how-many desktop programs that all want to write
something in user's directory just to give different defaults.

What I mean by that is, I expect that the distributions/desktop
environments can just set XDG_* variables, and a large amount of toolkits
and programs simply adhere to this directive.

I suggest that this is a reasonably sane behavior to adopt for GNUstep as
well: a default (or at least additional, easily adoptable) layout config
which uses the XDG_* variables, and defaults to something reasonably
universal (such as defaulting to ~/.config in case XDG_CONFIG_HOME is not
set).

Of course, the current default has been the default for long enough that we
may want to still implement a fall-back to reading from the location that
is currently shipped in the default layout config.

- ~/GNUstep can still be a decent location for everything not specified in
basedir-spec. For example, ~/GNUstep/Applications mentioned somewhere in
the thread is a good candidate for applications installed into user domain.
- XDG_CONFIG_HOME seems to map decently to GNUSTEP_USER_DEFAULTS_DIR in
layout.
- XDG_DATA_HOME seems to map decently to the NSApplicationSupportDirectory
in user domain; this doesn't seem to be listed in the layout config file
- Directories listed in XDG_DATA_DIRS seem to map decently to directories
in NSApplicationSupportDirectory's system domain, unless they explicitly
live in user's home folder.
- XDG_CACHE_HOME seems to map decently to NSCachesDirectory in user domain;
this also doesn't seem to be listed in the layout config file.
- XDG_RUNTIME_DIR "defines the base directory relative to which
user-specific non-essential runtime files and other file", and also seems
potentially useful; I assume this is a way to specify a per-user /tmp
equivalent (possibly living under /tmp).
- apparently in a separate spec there is XDG_DOWNLOAD_DIR
<http://0pointer.de/blog/projects/tmp.html> (also see here
<http://freedesktop.org/wiki/Software/xdg-user-dirs/>) which should be used
for downloads and downloads in progress -- that is, it seems to define
NSDownloadsDirectory and default to ~/Downloads. It doesn't seem to be an
environment variable; it seems specified in a file.
- that <http://freedesktop.org/wiki/Software/xdg-user-dirs/> link also
mentions XDG_DESKTOP_DIR -- without digging deeper, I would expect that the
actual list of directories obtainable through XDG_* variables is even bigger

If various desktop environments and toolkits make use of these variables
and config files, why wouldn't GNUstep applications? GNUstep doesn't even
currently have its own full desktop; if it did, it might sort-of even make
sense to get rid of the extra directory ~/GNUstep and write Applications,
Library, Defaults, etc, directly into user's home dir, as is done on
certain other operating systems.

Side note: This is good news for whoever creates a desktop environment or
distribution around GNUstep: this allows making non-GNUstep software adhere
to a different home directory layout.
-- 
Ivan Vučica
[email protected]
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to