Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

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
1  
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

 
discard

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.