I am using Fedora 13 and for shutting down and rebooting automatically, we have the following commands:
# shutdown -h/-r now
Similarly, if I want to make my system go into suspend mode after sometime, what command should I use?
|
I am using Fedora 13 and for shutting down and rebooting automatically, we have the following commands:
Similarly, if I want to make my system go into suspend mode after sometime, what command should I use? |
||||
|
|
|
The unix philosophy is to have tools that perform one job, plus the shell to combine them. So we'll combine a suspend command with a do-something-later command. I don't know what the standard command for suspending is on Fedora (there are several floating around); I'll use To suspend after X seconds: To suspend at a given time: |
|||||
|
|
The
Unfortunately, pm-suspend does not take a time parameter as far as I know. However, you could write a wrapper script that took a time parameter. Save the script somewhere in your $PATH and chmod +x it. Do not call it "suspend". A simple one may look like this:
Warning: I have not tested this beyond "works for me". You may consider changing the suspend command to pm-suspend-hybrid which will also save a hibernation file in case you run out of power while suspended. Other utilities that you may be interested in or that could make your script more robust are pm-hibernate, pm-is-supported. |
|||
|
|