a program to facilitate setting a clock in sync with linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I actually already have a system such as you describe. Here is a link to 
a tgz file:

http://www.iavit.org/~john/debian/oclock.tgz

This script says the current time, just the hour and minute, in a fairly 
nice  artificial voice. Personally, I run it once an hour from crontab. 
It requires aplay which,on debian, is part of the alsa-utils package. 
The key thing to this is actually the sound files. You can look at the 
script but it's opretty much just a one liner with the aplay command 
taking the output from the date command. In fact, you could do something 
similar with the output from the date command being fed to espeak.

Installation:

1. Cd to a suitable directory for the script. /usr/local/bin is a good 
choice:

cd /usr/local/bin

2, Un-tar the file:

tar -zxf oclock.tgz

3. Call the script from crontab:

0 * * * * root /usr/local/bin/oclock/oclock






On 03/26/14 06:03, Kyle wrote:
> Are you trying to set other clocks based on the time on your Linux box,
> or do you need a clock that chimes on the hour and possibly ticks off
> seconds that runs on Linux? If you want to set clocks, they would need
> to be compatible with ntp, unless you are trying to send the signal that
> atomic clocks read to get the time, in which case you would need a radio
> board. If your clocks can sync with ntp, then you can just run that on
> your Linux box, or even on your router, if it runs an ntp server, or you
> could just sync it with the ntp server pool or usno.navy.mil if I have
> that hostname correct. I believe NASA also has an ntp server that keeps
> accurate time. If you just need a chiming clock, it's easy enough to
> write a script, and if there's enough of a demand for it, I could
> probably put something together fairly quickly. I'm thinking of a script
> that will tell the time using a human voice when run plus a cron job
> that would run every hour and could be turned on or off with a command
> line option or an environment variable. Let me know if this is what
> you'd like, and I'll be happy to take on such a project.
> ~Kyle
> http://kyle.tk/
>

-- 
---
John G. Heim, 608-263-4189, jheim at math.wisc.edu


[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux