This worked for me, just run the command as superuser.
For GNOME, this is now handled by systemd in Fedora 18+.
As root, edit
/etc/systemd/logind.conf. You're looking for the definition for HandleLidSwitch, it may be commented out.
Modified Command :
sudo gedit /etc/systemd/logind.conf
You could also change dir to the folder be for running the code.
$ cd /etc/systemd
$ sudo gedit logind.conf
The default is: HandleLidSwitch=suspend
You can set it to ignore, poweroff, reboot, halt, suspend, hibernate, hybrid-sleep, lock or kexec. Since your laptop screen is broken, you just want to set it to ignore, so add this to
Then, run systemctl restart systemd-logind, or simply reboot for it to take effect.
From : Preventing lid close suspension
Uncomment by deleting the # by the command. Then change suspend to ignore.