I had been looking for some alarm related software in Ubuntu, and i had found a solution using vlc together with cron job, so i had made my own alarm.

First Create a shell script
> sudo gedit alarm.sh
> Enter the following
#!/bin/sh
/usr/bin/amixer -c 0 sset Master,0 99%
/usr/bin/vlc --intf dummy --repeat /home/almond/gising.mp3
> Save and exit
> chmod +x ./alarm.sh

What this does is create a file what will set the mixer to 99 volume (amixer -c 0 sset Master,0 99%) and call vlc to play your mp3 using a dummy interface module (no interface inshort) and repeat the music unlessly. Then make the file executable.

Next stuff is to make an automatic/cron job for you (by default this will use vim as editor)
If the following does not work, follow the alternative instruction
> crontab -e
> press i to insert the following line
* 7 * * 1,2,3,4,5 /path/to/alam.sh
> exit vim (esc then :wq)

(This will make the alarm every 7am from monday to friday)

Fujitsu Computer Systems Corporation

Alternative instruction
> touch crontab
> gedit crontab
> Enter the following
* 7 * * 1,2,3,4,5 /path/to/alam.sh
> crontab -u crontab
> sudo /etc/init.d/cron restart

What this does it create a new cron file under you username and restart the cron process.

If you want a more simple approach try this one
http://alarm-clock.pseudoberries.com/, there is a guide on how to install it on linux.

I used the cron approach, now how to stop the music?
This will be fun coz you have to really wake up and type something or open system monitor to stop all vlc. If you cannot locate your system monitor then type these commands
> top
memorize the process id of vlc and press q
> kill -9

Hope this does wake you up, just don’t go back to bed after stopping the music.

Share and Enjoy:
  • Digg
  • Reddit
  • Slashdot
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • Fark
  • Facebook
  • Technorati
  • Sphinn
  • Furl
  • Google
  • Mixx