Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to get a program (a script that can be set to auto-start or something) that tells you every hour like "It's 11 o'clock."

I know it's easy on Macs, but how do you get that on Precise?

share|improve this question

2 Answers 2

up vote 20 down vote accepted

There's a program in the standard repos for it, saytime.

sudo apt-get install saytime

Then you can run saytime -r 3600 to run it every hour (3600 seconds, or change the number for a different interval in seconds). It will start as a background process when run with this option.

If you want to change the format (for example to remove the "and X seconds") it would be saytime -r 3600 -f %P%l%M - full format options in man saytime.

Source: http://ubuntuforums.org/showthread.php?t=516600&p=3130400#post3130400

share|improve this answer
    
@Dan Wow. Whoops. Good spot, that's rather an embarrassing one! Yes, it was indeed meant to be 3600. Edited to fix. –  Jez W May 22 '13 at 11:20
1  
If you have problems like sox FAIL formats: can't open output file '/dev/audio': Permission denied run it with padsp: $ padsp saytime -r 3600 –  franzlorenzon Jun 17 '13 at 7:19
    
@franzlorenzon How do you make padsp saytime -r 3600 work from Startup Applications in Gnome? I tried adding it there but it doesn't work. –  Tracy Iquiña Jul 18 '13 at 10:13
    
Does it work one the terminal? Can you see the log from Gnome (unix.stackexchange.com/questions/17244/…)? –  franzlorenzon Jul 18 '13 at 11:14
sudo apt-get install festival

If you wanna get crazy you can also add to gnome-schedule:

echo This is my custom message | festival --tts

Where custom message can include the output of the command

date

and if you want a nicer voice try something like:

sudo apt-get install festvox-us1
echo "(set! voice_default 'voice_us1_mbrola)" | sudo tee -a /etc/festival.scm
share|improve this answer
    
I think you should use cron too to make it run every hour. –  franzlorenzon Jun 17 '13 at 7:21
    
That's what I meant by gnome-schedule –  Jonathan Leaders Jun 20 '13 at 10:27
    
Ops, you're right :) –  franzlorenzon Jun 20 '13 at 11:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.