Per user dirs on Non-Unix platforms (was Re: [Python-Dev] Where to install non-code files)
Fred L. Drake, Jr.
Wed, 31 May 2000 11:09:03 -0400 (EDT)
Neil Hodgson writes:
> roaming work). If Unix code expects $HOME to be per machine (and so used to
> store, for example, window locations which are dependent on screen
> resolution) then CSIDL_LOCAL_APPDATA would be a better choice.
This makes me think that there's a need for both per-host and
per-user directories, but I don't know of a good strategy for dealing
with this in general. Many applications have both kinds of data, but
clump it all together. What "the norm" is on Unix, I don't really
know, but what I've seen is typically that /home/ is often mounted
over NFS, and so shared for many hosts. I've seen it always be local
as well, which I find really annoying, but it is easier to support
host-local information. The catch is that very little information is
*really* host-local, especicially using X11 (where window
configurations are display-local at most, and the user may prefer them
to be display-size-local ;).
What it boils down to is that doing too much before the separations
are easily maintained is too much; a lot of that separation needs to
be handled inside the application, which knows what information is
user-specific and what *might* be host- or display-specific. Trying
to provide these abstractions in the standard library is likely to be
hard to use if sufficient generality is also provided.
> Look at your $HOME on Unix box; most of the dotfiles are *files*, not
> directories, and that's all most applications need;
And Neil commented:
> This may have been the case in the past and for people who understand
> Unix well enough to maintain it, but for us just-want-it-to-run folks, its
> no longer true. I formatted my Linux partition this week and installed Red
> Hat 6.2 and Gnome 1.2 and then used a few applications. The dot directories
> outnumber the dot files 18 to 16.
Interesting! But is suspect this is still very dependent on what
software you actually use as well; just because something is placed
there in your "standard" install doesn't mean it's useful. It might
be more interesting to check after you've used that installation for a
year! Lots of programs add dotfiles on an as-needed basis, and others
never create them, but require the user to create them using a text
editor (though the later seems to be falling out of favor in these
days of GUI applications!).
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at BeOpen.com