View Single Post
Posts: 25 | Thanked: 9 times | Joined on Oct 2010
#38
Without a sim card and with inserting a new battery, I can make my n900 sync time over wifi on startup with:

Code:
root
vi /etc/event.d
  start on started hildon-desktop
  script
    sleep 60
    exec /usr/sbin/ntpd ntp.ubuntu.com
  end script
To disable the prompt that requires you to set the date and time each boot on a new battery insert do:
Code:
sudo apt-get remove osso-startup-wizard
See: http://talk.maemo.org/archive/index.php/t-87080.html

= More Info =
My usb charging port is broken. However, I have 2 batteries and charge them in an external charger. I have to swap them 2x a day. I do not have a sim card.

Previously I had to manually sync time every time I changed a battery (pressing a few buttons or running a script) and click on the set date and time prompt!

= Failed Attempts =
My n900 doesn't have the man command (not sure how to get it) so writing scripts was kind of difficult. Below are my failed automation attempts.

== sh ==
shell script works but can not be used with:
* alarmd GUI (only runs the first reboot after saving an event)
* event.d (couldn't get it to run correctly)

=== script ===
vi vask.timesync.sh
#!/bin/sh
echo '/usr/sbin/ntpd ntp.ubuntu.com' | /usr/bin/root
chmod +x vask.timesync.sh
./vask.timesync.sh

== rootsh ==
won't let me run it because it says deprecated and security risk

Last edited by vask; 2014-08-30 at 22:54.