Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i have problems waking up in the morning
each and every morning.
i decided to write some code for a big(or little) alarm
im thinking on using crond.
is it possible to get my computer on sleep mode ?
i dont have such buttons as sleep buttons on my keyboard.
i am asking this because i am sleeping not very far
from my computer 3meters and the sound from the cooler
is very annoying.
so i want to put it on sleep and also have crond run
so when morning comes about 8:00 ill have to be awake
so im thinking on going something like
mplayer /mnt/cdrom/01 - Guns N' Roses - Sweet Child O' Mine.mp3
that would be all...
i need some suggestions.
where to read about crond - some good paper.
where to read about options on playing with mplayer
how to put from console my computer on standby or sleep
so that it doesnt make that much noise and if it is still
crond conscient when it does that.
To go sleep mode try echoing mem or standby to /sys/power/state. If you have /proc/acpi/alarm you can experiment echoing desired wake up time to it (try it first to understand how it works). Try running "sleep 100; mplayer somemusic.mp3" from other copnsole just before making computer go to sleep - when it wakes up 'sleep 100' will happily finalize and pass control to mplayer. So, the correct order:
In kernel documentation....
Well, cat /sys/power/state half-documents it, and some experiments clears the rest.
The same with alarm.
What you think is a good sequence, isn't:
echo mem >/sys/power/state
--> after that computer goes to sleep. OK
sleep 100 && mplayer <smth> &
--> computer wakes up (!) and begins countdown
echo <time> >/proc/acpi/alarm
--> computer sets on alarm for getting up, though it will no go down.....
you might wanna check your bios settings as well to see if you can set it to turn on at a certain time. thats what i do. not as elegent as the other solutions but just as effective esp combined with an annoying start up sound!!!
may i also say by far the most ammusing post i've read all week
2)wait some time (specified in the script)
4)play some music
Computer reacts to your actions. First, you should explain it when to wake up, as it doesn't affect other operations. Second you tell it to wait 2 minutes and play music. Before 2 minutes expire you tell it to sleep. It falls asleep - so, when 2 minutes expire, nothing happens, it doesn't play music while it is asleep. Then the wakeup time comes. So it wakes up and starts working. The shell gains control and finds out that sleep has expired. So in the sequence "sleep && mplayer" the second command is run only now, when computer is again up.