Disable sleep and screen saver mode in CentOS

Source: Internet
Author: User

Due to special requirements, I want a Linux host to always display a program. The monitor cannot be shut down, sleep, or enter the screen saver mode.

Environment: Ubuntu is installed in minimal mode with a lightweight desktop openbox (not gnome ).
Because of X's screen protection, the power management mechanism is different from gnome. Therefore, you cannot set a tool for gnome.
Fortunately, we found the tool named xset.

The xset Program sets the Xwindows attributes after xwindows is started.
You can use manxset to view the specific usage. It is not described here.

You can use the xset command to set items:

1234 #xset s 300 # Set the screen saver time 300 Seconds, in seconds #xset s 0 # Disable screen saver #xset dpms 0 0 0 # The three values are Standby, Suspend, and Off, in seconds. # Xset-dpms # power off Management

You can also edit xorg. conf and add the following options to disable xscreensaver directly:

123456 Section “ServerFlags” Option “BlankTime” “ 0 # Disable black screen Option “StandbyTime” “ 0 # Disable the Standby function Option “SuspendTime” “ 0 # Disable sleep Option “OffTime” “ 0 EndSection

After modification, restart x to take effect.

Editing the xorg. conf file has the same effect as using the xset command. You can use xset-q to view the settings and the current configuration.


If the time value is set to 0, this item is disabled.
For more configurations, see:
Http://www.x.org/archive/X11R6.9.0/doc/html/xorg.conf.5.htmlAnd find "ServerFlags ".

This article is from the systems blog, be sure to keep this source http://systems.blog.51cto.com/2500547/1338050

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.