Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For a number of stationary machines here at the university, I would like to have a setup where the machines suspend themselves to save power 30 minutes after the last user logged out. How can that be done?

share|improve this question
up vote 15 down vote accepted

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.

share|improve this answer
+1, that's extremely useful – Stefano Palazzo Jan 5 '11 at 6:00
Awesome. Shame this kind of control isn't built into the power-saving preferences by default, or an option within Sabayon. – Scaine Jan 5 '11 at 20:46

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.