Autopoweroff: User Guide



Deragon Informatique inc. Autopoweroff: User Guide
SourceForge.net Logo

Table of Contents
1. About Autopoweroff
2. Supported Linux distributions
3. Download
4. Screenshots & Configuration
4.1. Autopoweroff configuration
4.1.1. Autopoweroff GUI configuration tool
4.1.2. Autopoweroff configuration file (autopoweroff.conf)
4.2. BIOS configuration
5. Installation
6. Uninstallation
7. License
8. Troubleshooting
8.1. Troubleshooting Glade warnings
9. For developers
10. To do
11. Change History
11.1. Version 2.9.1
11.2. Version 2.9.0
11.3. Version 2.1.0
11.4. Version 2.0.0
11.5. Version 1.2.0
11.6. Version 1.1.1
11.7. Version 1.1.0
11.8. Version 1.0.1
12. Miscelleanous
13. Contact

1. About Autopoweroff

Autopoweroff is daemon that is started at boot time, and which function is to shutdown the computer at a specific time, but only if some conditions are met. This software is meant for the Linux operating system.

The computer will shutdown if all the above conditions are met:

One good use of Autopoweroff is for home use, on a firewall/router server. You can setup Autopoweroff to shutdown the server every evening at say, 22:00. However, your server might serve other computers in your home. Autopoweroff will shutdown the server after 22:00 only if no other computer on the network is responding to ping. For example, if at 22:43 you are still working on your thin client in the living room, the server in your baseman will remain up. As soon as you shutdown the workstation, the server will go down.

The server can boot automatically every morning by setting its BIOS properly. Autopoweroff has nothing to do with this process. But with this setting, your home server does not need to run 24/7. The advantages such a setting offers are:

A nice GUI is provided to configure Autopoweroff's parameters. See Autopoweroff configurator.

The SourceForge page for this project can be found here.


2. Supported Linux distributions

Autopoweroff will work on most distributions. However, for some distribution you might have to manually move files to the right place to get it working and write your own init script so that Autopoweroff would start at booting. If you install Autopoweroff from the tarball, this is more likely.

Fully supported distributions include: Ubuntu, Fedora/Red Hat and openSuSE/SLED/SLES. It should also work with Debian and Mandrake. Download the .rpm or .deb package and everything will be installed and enabled automatically. This include setting up Autopoweroff to start at the next computer boot. And if you decide to remove Autopoweroff, everything gets removed.

With a package, you will only have to run the GUI configuration tool or edit /etc/autopoweroff.conf to your particular needs. Autopoweroff will be eventually submitted to Ubuntu's and Fedora's repositories, making it even easier to install it.

HELP WANTED

If you are running a distribution that is not yet supported by Autopoweroff, write to me. I will ask you some questions about your distribution and probably be able to add support for it.


3. Download

The latest version of Autopoweroff can be downloaded from SourceForge.

RELEASE CANDIDAT VERSION AVAILABLE.

Version 2.9.1 is a release candidate version (3.0.0 will be the stable release). I need people to test it. Unknown bugs might cause your system to shutdown even if someone is making use of it. However, 2.9.1 appears stable and I suggest people to try it out.

Please provide feedback by writing to me at hans@deragon.biz If enough people report to me that this version is stable, I will release it as such.


4. Configuration

Following are subsections that explains how to configure your system for Autopoweroff.

4.1. Autopoweroff configuration
4.1.1. Autopoweroff GUI configuration tool
4.1.2. Autopoweroff configuration file (autopoweroff.conf)
4.2. BIOS configuration

4.1. Autopoweroff configuration

There are two ways to configure Autopoweroff.

Following, the list of sub-sections.

4.1.1. Autopoweroff GUI configuration tool
4.1.2. Autopoweroff configuration file (autopoweroff.conf)

4.1.1. Autopoweroff GUI configuration tool

The Autopoweroff GUI configuration tool is pretty easy.

In the first panel named Status & Commands, the user can enable or disable Autopoweroff and poweroff or reboot the computer.

Status & Commands screenshot
Status & commands

In the second panel named Status & Commands, the user can configure the different parameters of Autopoweroff. See Autopoweroff configuration file for a description of the different parameters.

Configuration screenshot
Configuration


4.1.2. Autopoweroff configuration file (autopoweroff.conf)

The /etc/autopoweroff.conf (or ${prefix}/etc/autopoweroff.conf, for those who installed from the tarball) configuration file is well documented and easy to understand. Following is an example:

# Autopoweroff Test version configuration file.

# WARNING:  If you decide to edit this file, edit only the values of the
#           parameters.  If you add comments, they will be lost at the
#           next software upgrade or when the GUI configurator is being
#           used to update the file.  Only values persists.


# StartHour and EndHour parameters (expressed in hours):
#
#   Following is the time range where the computer should not shutdown
#   even if all conditions are met.  In this example where StartHour=5
#   and EndHour=22, the computer will not shut down between 05:00 and
#   22:00, local time.

[NO_SHUTDOWN_TIME_RANGE]
StartHour=5
EndHour=22


# StartupDelay parameter (expressed in minutes):
#
#   When the computer is booting up, if all the conditions are met and
#   the computer is in the shutdown time range, as soon as Autopoweroff
#   is started, the computer will shutdown.  Thus, the user will never
#   have the chance to boot into the computer.  This is where the
#   "delay" parameter comes in.  If "delay" is set to 15 for example,
#   Autopoweroff will not poweroff the computer even if all the
#   conditions are met, for a period of 15 minutes after the computer
#   has booted.  This allows the user to login and change Autopoweroff's
#   configuration.
#
#
# IdleTime parameter (expressed in minutes):
#
#   Like a screensaver, Autopoweroff detects keyboard and mouse
#   activity, and if there is any activity on the server, it would not
#   be powered off regardless if all the other conditions are met.  If
#   set to 0, user activity on the server will be ignored.
#  
#   PS/2 keyboards and PS/2 and serial mices are supported.  AT keyboards
#   will probably work too (if you can confirm this, please write to me).
#   Unfortunatly, USB keyboards and mices are not supported yet 
#   (I do not know how to detect activity on USB devices).

[TIMEOUTS]
StartupDelay=0
IdleTime=10


# Hosts parameter (list of hostnames or IPs, separated by commas):
#
#   Here you list the list of hosts your machine is dependant, i.e. this
#   computer should not shutdown if any of the hosts declared here is
#   still up (responding to ping).

[DEPENDANTS]
Hosts=mafalda, 192.168.0.5

4.2. BIOS configuration

It is possible to setup the BIOS so that the computer will boot itself every day. Each BIOS is different, but they are pretty much similar. Following are the instructions on how to setup an Award BIOS.

On the main page, select the menu POWER, then the POWER UP CONTROL item. Once the new screen shows up, move the cursor to the Automatic Power Up line and select Everyday. On the following line, set the time at which the computer should start everyday. Save the settings and voilà.


5. Installation

To install the .deb package, simply run:

sudo dpkg -i autopoweroff*.deb

To install the .rpm package, simply run:

rpm -Uhv autopoweroff*.rpm

For the tarball, extract it and run configure followed by make install.

tar xvzf autopoweroff.tar.gz
cd autopoweroff
configure --prefix="<path to the installation directory>"
make install

You will need to setup the init script properly. Two versions exists.


6. Uninstallation

To uninstall the .deb package, simply run:

sudo dpkg -r autopoweroff

To uninstall the .rpm package, simply run:

rpm -e autopoweroff

If you installed from the tarball, run

autopoweroff_uninstall

7. License

This software is covered by the GPL 2.0 license. For a local copy of the license, see file COPYING.


8. Troubleshooting

Following are troubleshooting sections.



8.1. Troubleshooting Glade warnings

8.1. Troubleshooting Glade warnings

Do not be alarmed by glade warning message showing up when you are running the autopoweroff command (the GUI configurator). These warning appears because you are running a different version of Gnome than the one upon which Autopoweroff was built. Probably you are running an older version, thus some new properties that were introduced are not supported on your older system. For instance, On a Fedora Core 4 system, you will get the following errors:

(autopoweroff:5954): libglade-WARNING **: unknown property `urgency_hint' for class `GtkDialog'

(autopoweroff:5954): libglade-WARNING **: unknown property `wrap_license' for class `GtkAboutDialog'

This is nothing to be concerned about.


9. For Developers

Autopoweroff might be of interest to developers because of the following reasons:

10. To do

The following are features to be added in future releases.


11. Change history

The following changes have been incorporated in the below mentioned versions:

11.1. Version 2.9.1
11.2. Version 2.9.0
11.3. Version 2.1.0
11.4. Version 2.0.0
11.5. Version 1.2.0
11.6. Version 1.1.1
11.7. Version 1.1.0
11.8. Version 1.0.1

11.1. Version 2.9.1 - 2008/06/01

Following feedback received from user Tomas Klema and another anonymous one, multiple small improvements and fixes were introduced in this version of Autopoweroff:

11.2. Version 2.9.0 - 2008/05/11

This release is a complete overhaul of the project.

11.3. Version 2.1.0 - 2004/01/19

11.4. Version 2.0.0 - 2003/11/23

11.5. Version 1.2.0 - 2003/06/07

11.6. Version 1.1.1 - 2003/05/03

11.7. Version 1.1.0 - 2003/04/27

11.8. Version 1.0.1 - 2003/04/14

12. Miscelleanous

This document has been created with AurigaDoc


13. Contact

If you have any questions or issues with this software, you can contact the following persons:

Author: Hans Deragon
Email: hans@deragon.biz
Website: www.deragon.biz