discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in NSUserDefaults


From: Erik Dalen
Subject: Re: bug in NSUserDefaults
Date: Sun, 10 Feb 2002 09:17:10 +0100 (CET)

On Sun, 10 Feb 2002, Richard Frith-Macdonald wrote:

>
> On Saturday, February 9, 2002, at 11:19 PM, Erik Dalen wrote:
>
> >
> > hi
> >
> > I've spent the last few hours trying to install GNUstep with
> > GNUSTEP_USER_ROOT=~ instead of =~/GNUstep
> > and I've noticed that there's a quite serious but in NSUserDefaults, the
> > GNUSTEP_USER_ROOT is hardcoded in it.
>
> I don't think that's a bug ... the GNUSTEP_USER_ROOT environment
> variable is
> intended to define one of the places where you can fine application,
> libraries
> and other resources.  That doesn't mean that *all* resources will or
> should
> be stored there.
>
but it automatically creates ~/GNUstep for the .GNUstepdefaults. And then
it creates ~/GNUstep/Library for the font-cacher. Even though that one
(should) use ~/Library in my case.

Also if it should have a fixed location for .GNUstepdefaults, why not have
it in ~/ ? It would be hidden anyway, and that would take away the need
for creating the ~/GNUstep directory when it's not needed.

> The thing about defaults is they need to be both private and writable, so
> you really can't work with other peoples defaults, and if your program is
> running setuid so that the user it's running as is not the same as the
> one it was started as, it needs to change where it gets/puts defaults
> info.  This means it has to compute the location of the defaults - it
> might well use different defaults databases during oen program run, and
> using any environment variable would be bound to be wrong for all but one
> of them.

Well, most GNUstep installations would have the same user root.
make-services in System/Makefiles/GNUstep.sh wouldn't funtcion well
otherwise. As you can't set another USER_ROOT before running GNUstep.sh,
and it would be quite pointless to set another after running GNUstep.sh

/Erik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]