Leif160519的blog Leif160519的blog

——————

目录
禁止Linux每隔十分钟黑屏
/  

禁止Linux每隔十分钟黑屏

可以使用xset命令设置各项:

xset s 300 #设置屏保时间为300秒,时间单位为秒
xset s 0 #关闭屏幕保护
xset dpms 600 900 1200 # 三个数值分别为Standby、Suspend、Off,具体什么意思就不多说了,单位秒
xset -dpms #关闭电源管理
xset dpms 0 0 0

若是ssh过去的,请先执行

export DISPLAY=:0

总结:只需要执行xset dpms 0 0 0xset s 0即可,但是这个是临时方案,重启失效,故最好弄一个脚本


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题禁止Linux每隔十分钟黑屏
作  者Leif160519
出  处https://github.icu/articles/2019/08/29/1567066066636.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!