Linux设置屏幕不熄屏-全屏化运行时均有效

Linux设置屏幕不熄灭

通过xorg.conf方式设置屏幕不熄灭屏幕,尤其是对需要开机自动全屏化运行自己编写的Qt桌面程序时,可以保证Qt界面程序,运行时,屏幕常亮

建立xorg.conf文件,内容如下

Section "Device"
	Identifier	"Configured Video Device"
EndSection
Section "Monitor"
	Identifier	"Configured Monitor"
	HorizSync	30.0-62.0
	VertRefresh	50.0-70.0
EndSection

#屏幕熄屏设置,设置屏幕常亮,此段代码用来设置屏幕常亮
Section "ServerFlags"
	Option	"BlankTime" "0"
	Option	"StandbyTime" "0"
	Option	"SuspendTime" "0"
	Option	"OffTime" "0"
EndSection


#其它设置:分辨率设置
Section "Screen"
	Identifier	"Default Screen"
	Monitor	"Configured Monitor"
	Device	"Configured Video Device"
	DefaultDepth	24
	SubSection	"Display"
		Depth	24
		Modes	"1024x768"
	EndSubSection
EndSection

xorg.conf 拷贝到/etc/X11/ 目录下,赋予可执行权限

chmod +x xorg.conf

你可能感兴趣的:(Linux系统,Ubuntu,linux,ubuntu)