Disable Screensaver
The last couple posts deals with pesky screensaver kept interfering with our display. We certainly want to have an easy way to disable the screen saver, and for that, we need to go to the source: X window session itself.
Most of the instructions I see on the internet specifies .xinitrc file modification. Although it should work, that makes the change permanent. If I can do it via user shell, I'd rather do it that way.
Fortunately, there is a set of xwindow utilities. The one we're interested in is called xset. Disabling DPMS (Energy Star) feature is as simple as
xset -dpms
Enabling it would be
xset +dpms
So, to disable screen blanking, we'd do this:
- xset s noblank #Disable blanking
- xset s off #Disable screensaver
- xset -dpms #Disable Energy Saving
And to enable them, we can do this:
- xset s blank #Enable blanking
- xset s on #Enable screensaver
- xset +dpms #Enable Energy Saving
So I created two scripts: unblank.sh and blank.sh respectively. Oh, I also put sudo command in front of them, just to make sure it takes.
Now, all I have to do in order to disable the screen saver is type
unblank.sh
on the command prompt. And to enable it, just type
blank.sh
And there you go. Note that xset does more than just dealing with screen savers. Check out its man page for details.
No comments:
Post a Comment