I am writing unit tests for Metacity. One of the things I want to be able to test is the response to various GConf settings. I am not seeing any easy way of running a per-process GConf server. Is there an easy way of doing this?
One alternative might be to add an optional bit of code to read .ini files and ignore GConf when one was specified. The prefs code in Metacity is modular enough that this wouldn’t be difficult. It might even be more generally useful: Metacity is buildable without GConf for use in embedded systems, but it uses all defaults and isn’t configurable.
Should be two parts:
1) running it in it’s own session (wrap your test in a dbus-launch call)
2) potentially use a separate gconf database source so you don’t muck with your own settings (see /etc/gconf/2/path)
I don’t know all the details of the gconf and metacity code, but I cannot see how this is *not* a good idea and a general contribution.
It certainly pushes all my “yes, everything should be modular and runnable stand-alone (or sandboxed) where possible” buttons.