One of the few things you can’t easily configure in Ubuntu is the option to make the computer sleep instead of hibernate when idle for X minutes. Here’s how to do it:
Press Alt+F2 and type gconf-editor then press Enter
Go to /apps/gnome-power-manager/actions/critical_battery
Change the value to whatever you wish. Possible values are hibernate, suspend, shutdown and nothing.