How to use your Linux Machine as an Alarm January 22, 2006
Posted by Carthik in commands, guides, snippets, ubuntu.trackback
You probably leave your computer on all the time. (Linux users keep it up longer, right?)
So instead of wasting more electricity by using an alarm clock to wake you up, why not put your desktop to work as a personal alarm? Like the Task Scheduler in Windows computers, it is really, really simple to have your Linux system do things at specified times in the future. This article will guide you through the process of using your desktop as a musical alarm.
Note: If you prefer player X and I use player Y in the examples below, you can easily substitute X for Y.
Use Kalarm:
Kalarm is the KDE alarm tool, which can, besides paying sounds, display a text file, or execute commands at specific times in the future. Even if you are an Ubuntu user (Gnome) you still can install and use kalarm. The name of the package to install is, unsurprisingly, “kalarm”!
Use the Xmms-Alarm plugin:
Xmms is the famous winamp-lookalike minimal music player for Linux. Install the package “xmms-alarm” and then you can use Xmms as an alarm. Downside: you will have to keep xmms running all night. No biggie? Alright then, you are all set. Click on the image above to see how to get to the point where you can set the preferences. (Right click on the Xmms window and Choose Options->Preferences->General Plugins)
Using Xmms and “at”:
Start XMMS and start playing songs. Adjust the volume to what you want to wake up to.
Push the stop button, then type:
$echo xmms -p | at 7:00
The “at” command line utility will make sure xmms starts playing at 7 AM the next day to wake you up.
Read $man at to find out more about “at”, which can do just about anything “at” a particular time.
Use “sleep” and “at” :
$sleep 8h && xmms /path/to/mp3file.mp3
This will open the mp3file.mp3 file with xmms after exactly 8 hours.
Use cron, mplayer, and a few other usual suspects:
More details at The Cron-Mp3 alarm clock writeup.
So , pick your poison potion!!!
Finally, if music doesn’t wake you up, the following sure will:
$sleep 8h && cat /dev/urandom > /dev/dsp
Thanks to all the ubuntu-users subscribers for writing in great suggestion, a few months ago.
another nice tip, again!
Umm, like your blog but this part struck me as funny: “Unlike windows computers, it is really, really simple to have your Linux system do things at specified times in the future.”
You do know about the “Task Scheduler” that has been part of windows since 1995, right?
Thanks John, I updated the entry. I totally forgot about the task scheduler, I swear!
Hi!
Nice tip! 🙂 I was just wondering: WTH does the last command do? 😛
Excellent tip once again
The last command sends a random stream of data to the sound output, so to speak.
Nice tip, but I can also recommend the script that’s standard in AmaroK. I’m one of those gnome/amarok users, and I must say: this alarm works great!
Last one realy works…. 😉
[…] Ubuntu Blog has a cool little post about how to use your Linux machine as an alarm. […]
kalarm doesn’t appear in the gnome systray does it? it’s a bug
That’s probably because kalarm was written for kde not gnome that’s kind of like trying to run windows media player on Linux, I’m sure it’s possible but do you really want to jump through those hopps to get there? It’s not a bug, I promise it’s just inherently compatable. Though you are running linux, grab the source code and make one for gnome. 😀
You know I just read the thing about K alarm also working on gnome desktops, that’s strange… normally it wouldn’t be so, now I feel stupid for not reading it all theway through, I saw the K and skipped like a dummy, still though… common practice says kde goodies and gnome stuff go together sloppily at best. 😉
Even the last one doesnt’t wake me up… I convince myself (in my sleep) that it’s just the rain outside… 🙂
MythTV? Maybe this is why no one has gotten around to writing MythAlarm for so many years. http://www.gossamer-threads.com/lists/mythtv/users/24235
I will try this simple solution on the myth box in my bedroom.
ugh! there are people that ain’t geek enought to sleep earing the computer fans.
I rather like the sound of computer fans when I go to sleep 🙂 Good post, I’m adding this to the TV that clicks on, an alarm clock above my bed backboard, and my cell phone that goes off at 5:30…. maybe I won’t be late to work anymore! …nah!
Thanks for the tip. I’ve got a (probably simple) question for you. Every time I install something using the synaptic package manager on Ubuntu (I think its 6,06) I can’t find the program that I just installed. I checked all of the spots in the ‘Applications’ toolbar but don’t know where else to check. I’d be very grateful if you’d tell me where to look for the programs or a web page to help me learn more about Linux and Ubuntu more specifically.
Aaron, after you have installed something, in Synaptic, right click on the package you installed, choose “Properties” and then select the Installed files tab. If it was a binary application, chances are it would have been installed in the /usr/bin/ directory. Games are installed in /usr/share/games or something… however, reading the list of installed files should give you an idea as to where to find the executable. Once you have found it, type in the name of the executable from the command line, and Voila!
For example the default text editor, gedit is at /usr/bin/gedit. Since /usr/bin happens to be one of the paths that the system looks for executables in, you can type $gedit on the command line and run the editor. Hope this helped a little.
or use teatime instead… it’s available in the ubuntu repository, so go synaptic! 😀
KALARM is horrible. Why do i need to jump through fucking hoops to get an alarm clock on my computer. Why in gods name would i ever need to display a text file on my computer. “HEY REMEMBER ME? THE TEXT FILE YOU WROTE 3 HOURS AGO? HI ITS ME AGAIN!” NO!
I use Gnome and must say: LOVE KAlarm.
Just an useful piece of software.
If you hate it so much, maybe it just not for you, after all.
Thanks dude… It helped!
what about at + xmms-alarm plugin?
the last one is really helpful !
thanks 😀
It works perfectly!
thnks a lot!
With me, Xmms immediately starts playing?? Does anybody know why this is?
I know why. You’re not typing the ‘echo’ before the xmms –play | at teatime
the full command is:
echo xmms –play | at teatime
teatime being the time whenever you want.
hey 🙂
i have already installed xmms , but i don’t know how to install that xmms-alarm plugin.. i have it downloaded on my desktop, but can’t find it with synaptic.. what should i do?
cheap car insurance rates for teenage boys…
breathtaking subsumes:trek courtesies library …
We respectably suggest using http://onlineclock.net/about/
OK, our site might not be for everyone, but for those of you who want it easy, perhaps it’s a good solution 😉
Seriously, we offer a whole bunch of different alarm clocks you can use for free in your browser – please check us out.
All you need is flash installed for the alarm function to work properly.
how about “alarm clock?” (sudo apt-get install alarm-clock)
http://packages.ubuntu.com/intrepid/utils/alarm-clock
screenshot here: http://2.bp.blogspot.com/_Xy2g3N79xiI/STWJO0Q7T8I/AAAAAAAAARs/_XbVMsTt4QQ/s1600-h/alarmclock.jpg
I tried it out and it’s simple to use and has all the options anyone could ever need.
Thank you Foster.
I think your suggestion is the best.
Alarm-clock is now my favourite!
“I tried it out and it’s simple to use and has all the options anyone could ever need.”
+1 😉
hey! do you know anything that will wake my Computer (not me) at specific time. it will probably use ACPI. windows is much cooler in this area. you can schedule a task and enable “wake computer to perform this task”
Thanks John, I updated the entry. I totally forgot about the task scheduler, I swear!
Nice tip, but I can also recommend the script that’s standard in AmaroK. I’m one of those gnome/amarok users, and I must say: this alarm works great!
[…] then using your linux as alarm(or as a toDO list)https://embraceubuntu.com/2006/01/22/how-to-use-your-linux-machine-as-an-alarm/ […]
turk sikisi
I’ve also made my BASH version using audacious with fade-in. You can check it out here: http://www.docplanet.org/linux/turn-your-linux-machine-into-wakeup-alarm/
Very useful. Thanks. I use zomg instead of xmms to play songs, keep everything at the command line and it scrobbles to last.fm.
I am suree this article has touched all tthe internet users, its really really pleasant article oon building upp
new webpage.
Cool!
wh0cd473504 retin a .1 cream