[588] in Athena User Interface

home help back first fref pref prev next nref lref last post

Re: gnome configuration

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sat Jan 6 07:28:40 2001

Message-Id: <200101061228.HAA05350@egyptian-gods.MIT.EDU>
To: Richard Tibbetts <tibbetts@MIT.EDU>
cc: source-reviewers@MIT.EDU, aui@MIT.EDU
In-Reply-To: Your message of "Sat, 06 Jan 2001 01:47:53 EST."
             <200101060647.BAA14369@multics.mit.edu> 
Date: Sat, 06 Jan 2001 07:28:34 -0500
From: Greg Hudson <ghudson@MIT.EDU>

> Another issue this brings to mind is that GNOME explodes in a shower
> of gore if it can't write to dotfiles because of quota (and possibly
> also because of tickets running out). IIRC there is no way for
> exceptions to propogate up in the gnome_config system, and even if
> there is most apps don't check them.

You are correct; gnome_config_set_* does not check for errors when it
writes out new profiles.  It also doesn't use temporary files to do
updates; it just opens the profile for writing, dumps the contents,
and closes it.  (It does at least check that the open for writing
succeeded, and silently does nothing if that happens.)

Usually, losing tokens or going over quota will simply result in
failures to store configuration information (that is, the open for
writing will fail).  However, under rare circumstances, a profile
could be truncated to a zero-length file--if the user's tokens expire
between the open and close operations, or if the user manages to go
over quota and exceed the AFS 10% margin between the open and close
operations.

Here are some possible ways of addressing the problem:

	* It doesn't look like it would be very hard or very invasive
	  to hack gnome-config.c to safely update profiles using
	  temporary files.  We could even try to submit the patches
	  upstream.  The only hard issue would be picking temporary
	  filenames, and the only downside would be that symlinks
	  under ~/.gnome would get clobbered.

	* I think we should actually ditch the packs/dotfiles/gnome I
	  just submitted and instead modify panel to produce the
	  Athena panel configuration if no panels are configured.
	  (For those who don't know, panel's default configuration is
	  hardcoded programmatically into panel.)  That way, if panel
	  manages to eat its dotfiles, the user will at least wind up
	  with a sane setup.  And it takes away some complexity from
	  the default dotfiles, which is generally a good thing.

Theoretically, the first measure alone should be enough to solve the
problem, but I like the robustness afforded by the second measure.

home help back first fref pref prev next nref lref last post