After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 507310 - gconfd should be scoped to session bus
gconfd should be scoped to session bus
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-04 17:40 UTC by Colin Walters
Modified: 2008-10-28 01:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
connect to session bus (1.66 KB, patch)
2008-01-04 17:41 UTC, Colin Walters
needs-work Details | Review
scope to session bus and get rid of /tmp/gconf-$USER (21.85 KB, patch)
2008-05-08 21:41 UTC, Ray Strode [halfline]
committed Details | Review

Description Colin Walters 2008-01-04 17:40:08 UTC
Hi, 

GConf should be scoped to the session bus, rather than just hanging around and timing out.
Comment 1 Colin Walters 2008-01-04 17:41:13 UTC
Created attachment 102138 [details] [review]
connect to session bus
Comment 2 Kjartan Maraas 2008-01-04 19:16:11 UTC
Is there any code for the "hanging around and timing out" part that can be removed now?
Comment 3 Colin Walters 2008-01-04 19:25:48 UTC
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.
Comment 4 Colin Walters 2008-01-04 19:43:34 UTC
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.


Comment 5 Ray Strode [halfline] 2008-05-08 21:41:08 UTC
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.
Comment 6 Colin Walters 2008-05-08 22:21:33 UTC
Looks pretty good to me.
Comment 7 Ray Strode [halfline] 2008-05-09 14:28:29 UTC
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.
Comment 8 Ray Strode [halfline] 2008-05-09 14:45:36 UTC
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

Comment 9 Max Bowsher 2008-10-28 01:04:23 UTC
See bug 558181 for a regression caused by this change.