This is simple script that tell your Linux machine when to shutdown.
Since leaving my computer on for 24 hour, 7 day a week becoming a habit, I made 2 simple and easy to use scripts to shutdown my Ubuntu system automatically. Now I can fall asleep while listening to my favorite music without having to worry about shutting down my computer.
These scripts use Zenity interface & simple bin bash command.
There are 2 mode of shutdown timer in this script:
- Schedule shutdown timer - shutdown at any given time ( in 24 hour format hh:mm )
- Countdown shutdown timer - shutdown after given ( mm ) minute.
Screenshot
Select shutdown timer mode
schedule mode - enter time hh:mm in 24 hour format
countdown mode - enter countdown shutdown time [minute]
Abort shutdown
Download
- Download Auto-shutdown.zip file here.
- If you don't have Zenity pre installed in your system, install using Terminal:
sudo apt-get install zenityThere are 2 bin bash script files inside the folder - Auto-shutdown & Cancel-shutdown
Install & Use
- Extract Auto-shutdown.zip to any folder.
- Right click, select extract here [image below]
- Cut & paste Auto-shutdown folder to ~/.Gnome2/nautilus-scripts [ example image below]
- Auto-shutdown script should be available on right click > Scripts menu [image below]
- You can run shutdown timer script by clicking on Auto-Shutdown or abort shutdown timer using Cancle-Shutdown option.
- Make sure permission to execute as program is given to both script files.
- Right click on script files > Permissions tab and check the “Allow executing file as program” checkbox.
Note: This script is tested on Ubuntu Karmic Koala system. It might work on other Linux distros. I'm not a programmer & this is my first time writing scripts with Zenity interface.
No comments:
Post a Comment