In Fedora 18, the default behaviour on laptops is to suspend when closing the lid.
To disable this behaviour, add the following line to
/etc/systemd/logind.conf and reboot your system:
The screen will lock after a delay, which is 10 minutes by default.
You can lock your screen manually by pressing
Update #1: See
man logind.conf for more options,
such as triggering a shutdown when closing the lid.
Update #2: Instead of rebooting, you can just run
systemctl restart systemd-logind.service as root user.
Update #3: A new option has been added to logind.conf that
allows you to set
lock instead of