You are not logged in.
Pages: 1
I am trying to add time sync command to my startup script. I tried
sh -c "sleep 40 && gksu ntpd -qg" &
but unsurprisingly it doesn't work. It needs to run ~40 seconds after X started as it is pointless before it connects to wifi.
Offline
Syncing the clock without running the daemon
Warning:
Using this method is highly discouraged on servers and in general on machines that need to run continuously for more than 2 or 3 days, as the system clock will be updated only once at boot time.
Running "ntpd -qg" as a cron event is to be completely avoided, unless you are perfectly aware of how your running applications would react to instantaneous system time changes.
What you need is https://wiki.archlinux.org/index.php/Nt … s_a_daemon
With that out of way, gksu is a GTK frontend for su.
You may need to
export DISPLAY=":0"
Last edited by krisoijn (2011-09-03 07:51:47)
Offline
Maybe your network management tool can run it for you after the net comes up? I know netcfg can do that anyway.
Offline
I am using WICD. I doubt it has such capabilities.
As I already know how to run delayed commands from startup script (I run checkgmail and several other programs this way), all I need in essence, is a way to run root-privileged command from startup script.
Offline
I am using WICD. I doubt it has such capabilities.
http://wicd.sourceforge.net/moinmoin/Ad … %20scripts
Last edited by jasonwryan (2011-09-03 07:59:10)
Offline
Pages: 1