Fedora – Locking the screen when laptop lid is shut (Gnome 3.8, Fedora 19)

fedoragnomegnome3screensaver

I cannot figure out how to configure the screensaver to be run (which in turn causes the screen to be locked) every time I shut the lid of my laptop. I have xscreensaver installed and on Xfce it allowed me to configure an action when the lid is shut. Well, not on Gnome 3 🙁 Any ideas?

Edit: I do not want the computer to suspend/hibernate when I shut the lid; simply blank the screen.

Best Answer

From this answer: https://superuser.com/questions/748482/how-to-suspend-from-lockscreen-in-gnome-3 , in your /etc/systemd/logind.conf change the line to:

HandleLidSwitch=lock

and then sudo systemctl restart systemd-logind to restart the service.

Related Question