Sunday, December 16, 2012

Prevent Monitor Sleep in Gnome/Cinnamon

Edit: Currently using Screensaver Inhibit, a Cinnamon applet, and it seems to work well!

As I started using Cinnamon as a window manager, Caffeine shell extension for Gnome is not available anymore. This was a very convenient quick option to prevent screen going off in the middle of watching a movie. The root cause is that the option for screen going to sleep cannot exceed 1 hour in Gnome settings.
However, there are ways to modify this. I just wonder why something as simple as this is not already a part of standard system settings.
In order to prevent screen going off at all, these are the settings that need to be modified. This can be done either through command line (thus a perfect candidate for scripting, which is my current preferred option) or through a GUI, a program called dconf-editor.

org.gnome.settings-daemon.plugins.power sleep-display-ac
org.gnome.settings-daemon.plugins.power sleep-display-battery
org.gnome.desktop.session idle-delay

To display the value of these settings in a shell (command line), use "gsettings" with parameter "get" and then the name of the setting. For example:
gsettings get org.gnome.settings-daemon.plugins.power sleep-display-ac
To modify the value use "set" and a value at the end.
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac

Source: Disable GNOME3′s Habbit Of Turning Off The Display After Some Time (link)

No comments: