I'm working on a response to Steve's recent response, but I'll try to 
address this first.  (I've drafted a response, but I want to sleep on 
it before sending.)

On Sunday 26 June 2011 10:15:45 am Don Armstrong wrote:
> On Sun, 26 Jun 2011, Trans wrote:
> > What migration issues?
>
> Every single configuration-reading program will have to read user
> configuration in two different places, move existing configuration
> files so that it is clear to users which configuration file will take
> precedence, and then at some point in the future, stop reading
> configuration files in the old location.
>
> Complicate this by the fact that many people keep their home
> directories in version control systems[1] and otherwise modify
> existing behavior, and that for some of these programs, the
> configuration can lead to inaccessible or nearly unusable systems.
>
> I would imagine that we're talking about at least an hours worth of
> work for every single program, with some serious additional design
> work on top to deal with other problems which I haven't foreseen in
> the brief period I spent writing this mail. All for little benefit.

I would think we can do better than that.

First of all, initially, no program has to change.  And, until any one 
program changes, no changes have to be made to the system.

An early step in a migration path could be for distros to define 
environmental variables (or symlinks, or something along those lines) 
for the following:

   * $XDG_DATA_HOME
   * $XDG_CONFIG_HOME
   * $XDG_DATA_DIRS
   * $XDG_CONFIG_DIRS
   * $XDG_CACHE_HOME
   * $XDG_RUNTIME_DIR
   * for xdg-user-dirs, do something similar for the following: 
typedef enum {
  G_USER_DIRECTORY_DESKTOP,
  G_USER_DIRECTORY_DOCUMENTS,
  G_USER_DIRECTORY_DOWNLOAD,
  G_USER_DIRECTORY_MUSIC,
  G_USER_DIRECTORY_PICTURES,
  G_USER_DIRECTORY_PUBLIC_SHARE,
  G_USER_DIRECTORY_TEMPLATES,
  G_USER_DIRECTORY_VIDEOS,
  G_USER_N_DIRECTORIES
} GUserDirectory;

If distros don't want to do that, or until they do, an install script 
could be written to do that, for use only by users who are interested 
in making use of the XDG specifications.

When those environment variables / symlinks are defined in a distro, 
initially all of them could be set to the user's ~.   (That's without 
any thought--maybe there are better existing locations for some of 
those to point to.)

When some application developer or maintainer is willing to make a 
change to support the future approach, they have two choices:

   * (not recommended) they change their application to read 
configuration data from either of two places, either from ~ or (for 
configuration data) from $XDG_CONFIG_HOME or from 
$XDG_CONFIG_DIRS/<somedir> (whichever is appropriate)

<or>

   * (recommended) they change their application to read configuration 
data from a new ($XDG) location only, point out the need to setup 
environment variables or symlinks for those locations, and (optionally) 
distribute the install script that I mention above.  

In some sense, the migration is complete at that point.  (That may be 
stretching a point, but maybe not.)  

If programs have been written (or revised) to read from either of two 
locations (the not recommended approach), at some point, many years 
from now, they might be re-written again to read from only the new 
locations.

Randy Kramer

PS: 
<minor(?) rant>
Should I rant?  Probably not--maybe I'll be smart enough to delete this 
before I send it.  

One thing that annoys me about Linux is that--how to phrase it--in a 
variety of ways it is not user supportive.  Look at how well the 
filesystem (as now being documented) is setup to make life good for 
people like administrators.  Places to put binaries for different 
purposes (/bin, /sbin, /user/bin, ...), well-defined places to put 
programs packaged by the distro, optional programs not installed by 
packages from the distro, well defined areas for documentation, a place 
for boot files, a place for system wide configuration files, ...

Then, what does Linux do for the user--Linux gives him one directory 
(hierarchy) /home/<user> and dumps every kind of user related file into 
that one directory, hiding some of it.  I don't want my system 
organized like that, and Linux is capable of supporting me in the way I 
want to organize my system.  But some additional built-in flexibility 
would be helpful.
</minor(?) rant>




_______________________________________________
fhs-discuss mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/fhs-discuss

Reply via email to