Default paths in Base Directory Specification
Julio M. Merino Vidal
jmmv84 at gmail.com
Mon Sep 13 17:05:53 EEST 2004
Hi all,
first of all, please consider the following scenario: in the NetBSD's
packaging system,
pkgsrc, the default installation prefix for all applications is
/usr/pkg. All stuff installed
by the packaging system ends up in that directory, and nothing gets
into /usr nor
/usr/local. (Note that the administrator can change the prefix on a
host basis, thus
using other non-standard directories.)
With the actual Base Directory Specification, all the applications
that use it don't work
properly "out of the box". The user must configure his environment to
manually set
up the XDG_DATA_DIRS and XDG_CONFIG_DIRS variables to point under the /usr/pkg
prefix. The most obvious example is GNOME, as it simply _does not work_ without
those variables.
IMVHO, that behavior is broken. The programs should work after
installation without
having to mess with the environment. In fact, they _can know_ where
they got installed,
so it's not a problem for them to access their own files.
It couldn't be much of a problem if the specification said that the
default values for those
variables are: the prefix where the program got installed, /usr/local
and /usr. For example,
the following line:
"If $XDG_DATA_DIRS is either not set or empty, a value equal to
/usr/local/share/:/usr/share/ should be used.
Should better say:
"If $XDG_DATA_DIRS is either not set or empty, a value equal to
@PREFIX@/share:/usr/local/share/:/usr/share/ should be used.
or something like that. This could be almost the same as it says now,
but with the
advantage that applications could just work out of the box.
So my question is... why is it done the way it is? /usr/local and
/usr may be good
choices for Linux, but they are clearly a disadvantage for other
systems. (I'm still
trying to find a rationale behind the current decision, so please
enlighten me...)
Could the default values in the specification be changed to include
the installation
prefix as the main directory in the path? Telling the users to set
their environment
up properly will result in lots of confusion and statements like "bah,
NetBSD is worse
because I have to set this up by hand, while Linux does it just well"
(substitute
NetBSD with your favourite system that uses custom directories).
Thanks.
--
Julio M. Merino Vidal <jmmv84 at gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/
More information about the xdg
mailing list