Quote:
Originally Posted by celtica96
I wish I could help but I'm just a Linux newbie.
The same script appears in the same place on the Q5.
The Q5 does an even worse job of keeping time.
After a reboot/shutdown, it always reports a date of January 2, 1904 under the latest firmware.
I can reset the date and time with Sync but it's still irritating.
Any suggestions for this Q5 clock issue?
|
I sent an email to eletroworld ten days ago about my severe Q5 date/time issue but haven't gotten a reply.
I'm using my Q5 as a test bed for tweaks that I move to the Q7 and resetting the date/time has become a real pain because packages I install get the wrong date/time stamps if I'm not careful. (1904 is not a plausible year for a package/library.)
I decided to use the date/time problem as an excuse to write my first script.
The script given below resets the clock with any available time server then speaks the time. It requires that the Q5/Q7 be connected to the Internet and have flite installed (flite_time installs with the latest flite package from repository.handhelds.org). Flite_tiime uses the syntax, "flite_time HH:MM" where HH:MM is something like 10:02.
Disclaimer: This is not meant as a sterling example of scripting, just one that works. Your mileage may vary.
I opened up /usr/bin as Root and loaded "lxde-logout" in Leafpad.
I saved the file as "now" without the quotes before making any changes to avoid corrupting my original "lxde-logout" file.
I edited the "now" file so it contains only the following:
#!/bin/sh
sudo ntpdate pool.ntp.org
var_now='date +%H:%M'
flite_time $var_now
I saved the file to the same directory and right clicked on it to change the Permissions to enable Execute for Owner, Group, and Other Users.
To test the script, select the Panel Menu option Run and type "now" without the quotes in the text field and tap the OK button.
The Q5/Q7 should go out to the 'net, update the time and date, and use a Scottish voice to tell what time it is.
I like this script and hope you do, too. Please feel free to help improve it.