Your Ad Here

Auto Shutdown Timer GUI Script : Zenity

January 12, 2010

Auto Shutdown Timer ( Sleep ) script for Gnome Ubuntu

Switch it off. Save energy & money by shutting down your computer automatically.
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:

  1. Schedule shutdown timer - shutdown at any given time ( in 24 hour format hh:mm )
  2. Countdown shutdown timer - shutdown after given ( mm ) minute.


Select shutdown timer mode

schedule mode - enter time hh:mm in 24 hour format
countdown mode - enter countdown shutdown time [minute]

 Abort shutdown

  • Download file here.
  • If you don't have Zenity pre installed in your system, install using Terminal:
sudo apt-get install zenity
There are 2 bin bash script files inside the folder - Auto-shutdown & Cancel-shutdown

Install & Use
  • Extract 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. Any feedback, feel free to leave comments on comment section below.

blog comments powered by Disqus