Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

KDE digital clock NTP server time adjust.

104 views
Skip to first unread message

Franco Martelli

unread,
Jun 29, 2013, 10:00:01 AM6/29/13
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I,m on Wheezy amd64 port.
I installed both ntpdate and rdate packages but automatic date and
time update of KDE digital clock on the desktop doesn't work.
Do I need package like kdesudo in order to make things working?

Trying with rdate I got:

$ rdate europe.pool.ntp.org
rdate: Could not connect socket: Connection refused
$ rdate -ncv europe.pool.ntp.org
rdate: Could not set time of day: Operation not permitted

Please, any hint that help me to solve this situation would be really
appreciated, thanks in advance.

- --
Franco Martelli.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRzuZvAAoJEFM/ma7n+T+7V2UH/267jQsKiv6/qMUyiizTjY/I
yPzIqybCBwuwAMhRZ0I+yGayds9c821eSVF4nxz7oMu7gAhdTLNFnum9whX9LNHm
4svHXs7F2LYDZ2n5F54NwG30flKx/N8Y4sFfyfeznDNyGVjiSjLC7SBl3l5g3YHK
rKxe5C4fZoSjYSLbTxVj8nNluo9AGh5Vxg4A7iGJgaaJukD5kAeYQ/Fgp6DSaTJV
doKKffJa6QlIxgBTCwR/SRz0fV/CutvtIHV1KJ6f9G5mg16zlCtI8jaXbo647tCe
hoM0NjEj/sPzRaoTJkm8ZaTSgSu1Fue1RbUCfmGFfoOZ39Yc7YmPRHMU1grrMjQ=
=8TM7
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/51CEE66F...@gmail.com

Erwan David

unread,
Jun 29, 2013, 1:50:02 PM6/29/13
to
Le 29/06/2013 15:51, Franco Martelli a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I,m on Wheezy amd64 port.
> I installed both ntpdate and rdate packages but automatic date and
> time update of KDE digital clock on the desktop doesn't work.
> Do I need package like kdesudo in order to make things working?
>
> Trying with rdate I got:
>
> $ rdate europe.pool.ntp.org
> rdate: Could not connect socket: Connection refused
> $ rdate -ncv europe.pool.ntp.org
> rdate: Could not set time of day: Operation not permitted
>
> Please, any hint that help me to solve this situation would be really
> appreciated, thanks in advance.
>
> - --
> Franco Martelli.

1) rdate is not ntp related so the first answer is normal

2) ntpdate is to be used by root, however it should not be used for
automatic update except at boot. You should install the ntp package
which works continuously by adapting clock speed, and is the best way to
get and keep a correct time.

The default configuration should work without problem for a client machine.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/51CF1CAA...@rail.eu.org

Bob Proulx

unread,
Jun 29, 2013, 2:30:01 PM6/29/13
to
Franco Martelli wrote:
> I installed both ntpdate and rdate packages but automatic date and
> time update of KDE digital clock on the desktop doesn't work.
> Do I need package like kdesudo in order to make things working?

No. Your choice of packages is unfortunate. A mistake. Instead
install 'ntp'.

# apt-get purge ntpdate rdate

Then install the ntp package.

# apt-get install ntp

More information about NTP can be found on the wiki.

http://wiki.debian.org/NTP

The above must be done as root as indicated by the '#' prompt. Use
either 'su' or 'sudo'.

$ su
# apt-get install ntp

Or if you have sudo installed and configured then you can use sudo in
one step.

$ sudo apt-get install ntp

I always recommend configuring sudo. You can do it this way:

# apt-get install sudo
# adduser yourusername sudo

Then log out and log back in again so that your group will be set at
login time to the sudo group. More information about sudo is
available on the wiki.

http://wiki.debian.org/sudo

> Trying with rdate I got:
>
> $ rdate europe.pool.ntp.org
> rdate: Could not connect socket: Connection refused

Your prompt indicates that you are not root. Therefore it cannot
function.

> $ rdate -ncv europe.pool.ntp.org
> rdate: Could not set time of day: Operation not permitted

Same thing. You were not root and therefore it cannot function.

> Please, any hint that help me to solve this situation would be really
> appreciated, thanks in advance.

Using ntp is the better solution over using rdate. You don't want to
step the clock all of the time. In the random hit cases where the
stepping happens at a bad moment then it will cause problems. Cron
tasks may run twice or not at all. Better to use a tool like ntp that
adjusts the clock so that every second is seen and never skipped.

Bob
signature.asc

Franco Martelli

unread,
Jun 30, 2013, 10:40:02 AM6/30/13
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 29/06/2013 20:24, Bob Proulx ha scritto:
> Franco Martelli wrote:
>> I installed both ntpdate and rdate packages but automatic date
>> and time update of KDE digital clock on the desktop doesn't
>> work. Do I need package like kdesudo in order to make things
>> working?
>
> No. Your choice of packages is unfortunate. A mistake. Instead
> install 'ntp'.
>

But I used strings command to looking for in kcm_clock.so (for
investigation) and its output suggest me to install ntpdate or rdate
in order to obtain digital clock automatically updated.

# strings /usr/lib/kde4/kcm_clock.so|sort|less

then hit "/" to enter in search mode and type "ntpdate" less will
point to the following string:

No NTP utility has been found. Install 'ntpdate' or 'rdate' command to
enable automatic updating of date and time.
...

Should I ask to KDE or QT related mailing list?
Thanks in advance for any answer.

Regards.
- --
Franco Martelli.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR0EELAAoJEFM/ma7n+T+7pHUIAImoQfDr8diTdxp+NOmFG+DJ
jCkSIxLpD+ePdMfLBInMUeGXbr80QTohT88vSX7w1gno7cd+LYnCA9M3B8cLHKKz
FgRxxgY2LPod8TyXXF5+TybSVIdT72SLMTIaxucspjENY25KXZS3DY5V51qmMfjG
ELyX/EeWLvv3i8rcxBMr4YpMIXMG4ypisjOuiROXqermftuMTI7FTJQUNfLL5e0W
x48G+QMPd4hE8eNN9WUw+06FF93y936MjzOUpfvEv6Jhbl31EQbL2PZfFmu2fBGi
LBgPaT+MNH6Ur40rOrpndDOGfw7gSN/cHsxAmGkfk2/OXTclHBNun+uWfdT+nFI=
=YNMF
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/51D0410C...@gmail.com

Bob Proulx

unread,
Jun 30, 2013, 11:50:02 AM6/30/13
to
Franco Martelli wrote:
> Bob Proulx ha scritto:
> > Franco Martelli wrote:
> >> I installed both ntpdate and rdate packages but automatic date
> >> and time update of KDE digital clock on the desktop doesn't
> >> work. Do I need package like kdesudo in order to make things
> >> working?
> >
> > No. Your choice of packages is unfortunate. A mistake. Instead
> > install 'ntp'.
>
> But I used strings command to looking for in kcm_clock.so (for
> investigation) and its output suggest me to install ntpdate or rdate
> in order to obtain digital clock automatically updated.
>
> # strings /usr/lib/kde4/kcm_clock.so|sort|less
>
> then hit "/" to enter in search mode and type "ntpdate" less will
> point to the following string:
>
> No NTP utility has been found. Install 'ntpdate' or 'rdate' command to
> enable automatic updating of date and time.

I am impressed that you used strings to find the text notes in that
library! Very clever. However those are just hints left there by the
programmer of that library. And those are notes that are buried quite
deep. They won't have had as much review.

> Should I ask to KDE or QT related mailing list?

I would file a bug against that library asking that the hints included
in it be updated. The hints are providing bad advice. Because
"stepping" the clock is never desirable.

However the way you found that hint is unusual. I don't know how that
hint would be shown to the user normally. It might never be shown to
the user. In which case it would be hard to call that a bug.

> Thanks in advance for any answer.

In my not so humble opinion the hint advice offered by kcm_clock.so is
bad advice. It advises to install programs that are designed to step
the clock. Stepping the clock during normal runtime operation of the
system is bad and causes other problems.

I think it should advise correcting the clock more generically.
Because any specific advise today may be stale and obsolete in the
future. Packages change and technologies move forward. Embedding
high level system advise in a low level library seems prone to
becoming out of sync.

I would purge rdate and ntpdate and install ntp as I recommended in
the previous email.

# apt-get purge ntpdate rdate
# apt-get install ntp

Bob
signature.asc
0 new messages