Skip to Main Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate content levelBeginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
Start Desktop Applications Automatically #72
Chapter 9, Administration and Automation
|
221
HACK
Automate NTP Synchronization
Apart from setting your clock, one of the best uses of NTP is to synchronize
your clock regularly to compensate for the natural drift that occurs with a
hardware clock. This drift is caused by various issues such as power fluctua-
tions and hardware problems, but if you synchronize with NTP as often as
possible, you can reduce this drift.
To schedule synchronization at regular intervals, use a cronjob to automate
these NTP updates. “Automate Your Life with cron”
[Hack #70] fully explains
the uses of cron. You can create your cronjob by opening the
cron file with:
foo@bar:~$ crontab -e
Then add a line to define the cronjob. As an example, to synchronize your
clock once a day at 3:00 a.m., use this line:
00 03 * * * ntpdate ntp.yourserver.com > /dev/null
When you save and quit the editor, your cronjob will be enabled and your
clock will be updated regularly.
HACK
#72
Start Desktop Applications Automatically Hack #72
Start tools, utilities, and applications automatically as soon as you start your
favorite desktop or window manager.
You might want to start a number of programs automatically as soon as you
launch your window manager or desktop environment. For example,
assume you set up your LinEAK keyboard utility so that you can use all the
special keys on your Internet and multimedia ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones
Introducing Linux Distros

Introducing Linux Distros

Jose Dieguez Castro

Publisher Resources

ISBN: 0596009119Supplemental ContentCatalog PageErrata