Automatically suspend if no one is logged in for 30 minutes

Solution 1:

What you need to do is set up your power management preferences for the gdm user. To do this from the command line use this command to make the preferences window show up when you log out or switch user:

sudo cp /usr/share/applications/gnome-power-preferences.desktop /usr/share/gdm/autostart/LoginWindow/

Now log out, restart or switch user and you should get the power management preferences window. (I did, I just tested this)

alt text

Once you've set up your preferences how you like them, log back in and remove the auto start desktop file:

sudo rm /usr/share/gdm/autostart/LoginWindow/gnome-power-preferences.desktop

Seeing as your managing a lab, you will want to know how to duplicate these settings for all the comptuers on your network without busting a sweat all day. Simply sync the /var/lib/gdm/.gconf directory to your other computers (I have automated scripts to do this on my network, you might too)

You can run this trick with a bunch of different configuration apps, look at what's auto starting, in the directory above, to see what kind of services are available. It is possible to change the theme and wallpaper this way too, but you can use gdm2setup, a third party app to do some of that.

Solution 2:

Unfortunately it no longer works under 12.04LTS.

It seems that gnome-power-preferences.desktop is no longer part of the distro.

I was able to do this in 12.04 with powernap. I had to explicitly tell it to suspend instead of just power save.