How can I change the time before the system locks?

When I step away from my Linux computer for a while, the system locks and I have to enter my password to unlock it.

How can I change the time before the system locks?

I've hunted through all the GUI menus and haven't found anything. There are some settings in /etc/login.defs but they all seem to apply to logging on to the system and not to timing out after the initial login.

I'm running Linux Mint 10. I'm also testing some other distros (Debian, OpenSuse, Fedora, PCLinuxOS, and Arch), so I'm looking for both distro-specific and general solutions.


On Ubuntu 10 running Gnome:

System -> Preferences -> Screensaver. There's a checkbox to lock after the screensaver activates, and there's checkbox and a slider to activate the screensaver after a certain amount of time.


On Fedora Core 18 (Gnome)

Using the GUI tools:

Applications > System Tools > System Settings > Brightness & Lock

From the terminal (to set sleep timeout to 10 minutes / 600 seconds, then require login after 15 minutes / 900 seconds):

gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 600
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 600
gsettings set org.gnome.desktop.session idle-delay 600
gsettings set org.gnome.desktop.screensaver idle-activation-enabled 'true'
gsettings set org.gnome.desktop.screensaver lock-enabled 'true'
gsettings set org.gnome.desktop.screensaver lock-delay 900