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

Re: ${HOME} vs. g_get_home_dir ()



"Bernhard R. Link" <brlink@debian.org> writes:
> * Simon McVittie <smcv@debian.org> [120926 18:50]:

>> ... but I don't think this is the right way to make it happen. Please
>> research previous discussion to check that you're not missing arguments
>> that have happened in the past, then if you still think your proposal is
>> the best option, take it upstream.

> This was already taken upstream and upstream's opinion was
> "if we do this as the unix guys expect then users complain that
> changing $HOME changes the home directory.".

For what it's worth, I strongly agree with Ivan on the general principle.
There are various techniques that are useful to use when one's home
directory is in AFS that require being able to override the default home
directory for applications by setting $HOME, so this was an important
feature for us at my day job.  Back in the late 1990s, we (Stanford
University) found, fixed, and submitted patches for this bug in dozens of
open source packages, mostly mail clients, with a fair bit of success
getting them upstream.  It would be very sad to see that regress.

> The documentation for g_get_home_dir[1] also documents what a proper
> program can do, it's a simple:

>  const char *homedir = g_getenv ("HOME");
>    if (!homedir)
>       homedir = g_get_home_dir ();

> instead of using get_get_home_dir directly.

Oh, I'm glad that they at least document this.  But it would still be nice
if the default did the right thing.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: