6

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.

2 Answers 2

4

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.

1

in your /etc/systemd/logind.conf file, add the line

HandleLidSwitch=suspend

or if that doesn't work,

HandleLidSwitch=hibernate

Source: http://www.freedesktop.org/software/systemd/man/logind.conf.html

4
  • Don't know if it matters but he's on Fedora.
    – slm
    Aug 15, 2013 at 16:16
  • Releated: forums.fedoraforum.org/showthread.php?t=292190. That variable can also take the value lock.
    – slm
    Aug 15, 2013 at 16:23
  • Agreed that comment was more to guard you if others come along in the future and see the difference they'll know that it was already addressed by your follow-up comment. I also provided a link to fedoraforum with the same solution for added protection.
    – slm
    Aug 15, 2013 at 16:25
  • Yes, that would work if I wanted the machine to suspend. But I simply want to blank the screen and lock it at the same time when I shut the lid, not suspend.
    – mart1n
    Aug 16, 2013 at 7:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .