GNOME Bugzilla – Bug 507310
gconfd should be scoped to session bus
Last modified: 2008-10-28 01:04:23 UTC
Hi, GConf should be scoped to the session bus, rather than just hanging around and timing out.
Created attachment 102138 [details] [review] connect to session bus
Is there any code for the "hanging around and timing out" part that can be removed now?
Almost certainly; however, it seems safest to me to keep that code in. The reason is that in some (broken/unusual) cases GConf can be spawned outside of a real session. For example, someone running gconftool-2 from a Linux VT. This is also why I made the dependency on the session bus "soft" in that it will just log an error, not hard fail.
Looking through the code, it seems likely (though I am not entirely sure) that this change may lose any preferences modified since the last "sync". What we should probably do is modify the patch to set exit_on_disconnect(FALSE) and then call shutdown_databases, and then exit.
Created attachment 110602 [details] [review] scope to session bus and get rid of /tmp/gconf-$USER This patch takes Colin's comments above into account and also gets rid of /tmp/gconf-$USER/ior to deal with bug 167030 It hasn't been thoroughly tested.
Looks pretty good to me.
I talked to hp about this patch on irc and he didn't see anything obviously wrong with it either. I'm going to commit it now while we're still early in the devcycle to help catch if it breaks anything.
2008-05-09 Ray Strode <rstrode@redhat.com> Tie gconf daemon to session bus and drop use daemon GetIOR() method instead of /tmp/something/ior to tell clients about ior (bugs 141138 and 507310) * configure.in: depend on dbus * gconf/gconfd.c (get_introspection_xml), (bus_message_handler), (get_on_d_bus), (main): Connect to message bus, take org.gnome.GConf name, and export GetIOR() method. Quit, when session quits. * Makefile.am: * gconf/org.gnome.GConf.server.in: new service file to support session bus activation * gconf/gconf-sanity-check.c (offer_delete_locks): Daemon doesn't have a lock anymore, so need to try to blow it away. * gconf/gcon-internals.c (read_current_server_and_set_warning), (read_current_server), (gconf_get_current_lock_holder), (gconf_daemon_blow_away_locks), (set_cloexec), (close_fd_func): dropped functions dealing with files in /tmp (get_ior), (gconf_get_server), (gconf_get_lock_or_current_holder), (gconf_activate_server: call GetIOR method instead of of reading /tmp/gconf-$USER/ior
See bug 558181 for a regression caused by this change.