Patch webOS Hourly Chime

From WebOS Internals
Jump to navigation Jump to search


On my old Treo, I used to use an application called "Chime v1.2" by Redwood Creative Computing. It allowed you to set a Chime that would go off to remind you as every hour elapsed. I don't know about you, but it's easy for me to get wrapped up in something (such as playing with the Pre) and lose total track of time. This can result in "problems" when dealing with other people; bosses, wives, girlfriends, etc.

I miss my old chime, so here is how I recreated it on the Pre.

How-To:

First, be sure you are logged in as root, the filesystem is writable, and your Pre has net access.

If not already there, Add the following lines to the beginning of /etc/event.d/crond: (use vi or nano)

start on stopped configure
stop on runlevel [!2]

description "crond"

Save your changes and close the editor. At the command prompt, execute the following commands:


 mkdir -p  /etc/cron/crontabs
 cd /usr/share/systemsounds
 wget http://lunaware.com/chime/chime.pcm

Add the following lines to /etc/cron/crontabs/root:

0 0,10-23 * * * /usr/bin/luna-send -n 1 palm://com.palm.audio/systemsounds/playFeedback {\"name\":\"chime\"} > /dev/null 2>&1
0 * * * * /usr/bin/luna-send -n 1 palm://com.palm.vibrate/vibrate {\"period\":500,\"duration\":1500\} > /dev/null 2>&1

You can customize the times here if you wish. I have the audio portion of my chime go off starting at 10am and running through midnight. The Vibration goes off every hour round the clock, but it's subtle. (read: won't wake anyone) If you have your ringer off, you won't hear the audio portion of the chime, such as when in a theater. If you are unsure about how to adjust the crontab entries to get the result you want, just google "crontab examples".

last step: Reboot! (you MUST reboot to get the system to see the new chime sound, restarting LunaSysMgr or rescanning will NOT work!) You can simply type reboot and close your terminal.

Once the phone reboots, log back in and test the chime with:

luna-send -n 1 palm://com.palm.audio/systemsounds/playFeedback {\"name\":\"chime\"}

You should hear a pleasant "dong" sound. (make sure your ringer switch is on if you don't!)

That's it! Enjoy!

Credits:

pEEf