These little bash snippets tell you how long in seconds before your screen locks and how to
keep your screen from going to sleep. This is for Gnome 3 in Linux.
To find the time in seconds before your screen goes to sleep:
[me@mybox ~]$ gsettings get org.gnome.desktop.session idle-delay
Set this setting to 0 to keep your screen from going to sleep:
[me@mybox ~]$ gsettings set org.gnome.desktop.session idle-delay 0
NOTE: Don’t set the idle-delay to 0 and leave the room for too long, because anybody has access to your logged in session.