GNOME Bugzilla – Bug 533870
NTP support
Last modified: 2010-12-09 17:26:51 UTC
When ntp is turned on, it doesn't make sense to configure the time manually. Currently, the time settings dialog appears just broken in that case. Here is a patch that adds very minimal ntp support (just a checkbox to turn it on/off, no configuration at all). The main point is to make it obvious why setting the time manually is not useful or working in that case.
Created attachment 111158 [details] [review] ntp patch
Created attachment 111159 [details] screenshot without ntp
Created attachment 111160 [details] screenshot with ntp
I can't stop asking myself why the clock applet doesn't use the ntp/time interface in system-tools-backends. Ditch the rest if you want, whatever, but in the backyard there are already heaps of reinvented wheels.
Reason 1) is that that the use of PolicyKit in system-tools-backends is too coarse to be useful. Reason 2) is that I can't find a useful description of the stb interfaces Reason 3) is that gnome-system-tools are not in Fedora
1) PolicyKit doesn't allow unlocking a set of privileges without asking for the password several times, and in system-tools-backends it was chosen to have each DBus object do one specific task, so it's usual that tools poke several DBus objects, which would mean spamming the user asking for password if permissions were more fine grained. 2) http://system-tools-backends.freedesktop.org/dbus-spec.html 3) system-tools-backends is not gnome-system-tools, nor Fedora is gnome. Using some part in s-t-b doesn't make you sign a contract and live with the whole family. Besides, if gnome already has a blessed dependency to do a task, it seems to me something more than obvious to use it.
1) This is a gross misunderstanding of what PolicyKit is all about. Its not about asking for passwords on every turn of the way, it is about granting or denying authorizations for privileged operations, ideally without asking for passwords 90% of the time. There is no mandatory 1-1 mapping between privileges and dbus objects. Privileges need to be finegrained enough that a policy can e.g. allow every user to set timezones, without allowing them to delete other users accounts at the same time. 2) There are a lot of things wrong with these interfaces, let me just point out two obvious ones: a) A more useful 'user service' would also provide additional metadata for each user, such as a login photo, language, password hint. A simple map of /etc/passwd to a dbus data structure does not solve any of the problems we currently face with user information e.g. in gdm. b) I wonder how well your usersconfig backend handles systems with thousands of users in a directory or NIS, if the only interface you have is 'full dump'. 3) 'blessed' != 'right tool for the job'. Don't get me wrong, I've been a strong proponent of investigating gnome-system-tools as an alternative to Fedoras aging collection of system-config tools. But when I finally took a deeper look at g-s-t a while ago, my conclusion was that g-s-t/s-t-b are not what we need.
Matthias, g-s-t may not be up to your expectatives to some extent, but I can't believe it doesn't fit any, specially regarding something as simple as NTP settings. I've been fine for years with RedHat/Fedora using their own tools, but in this patch you're beginning once again from scratch what s-t-b does already fine for the most usual distros (and the approach you took with the clock applet helper is really really similar), you're forcing once again users to bear non-working GUIs and confusing them about where to blame, and developers to hack distro-specific solutions. But well... I've grown tired of it and am not passionate anymore about trying to push g-s-t/s-t-b forward, It just striked me as something purely obvious to use what's already available and working well enough. So, do whatever you want.
The thing that worries me the most about this is that I have absolutely no idea if this will work for all distros (well, I guess it won't). An example is that the check for /etc/ntp.conf to see if ntp can be used is probably wrong in some way: I'm nearly sure that if you install ntp and remove it on a debian-based system, the file will stay... It's on my TODO list for 2.24, but I need to figure out a few things first.
*** Bug 558860 has been marked as a duplicate of this bug. ***
*** Bug 590091 has been marked as a duplicate of this bug. ***
*** Bug 619602 has been marked as a duplicate of this bug. ***
Code is now in gnome-settings-daemon's helper.