How to Determine if LCD Monitor is Turned on From Linux Command Line

前端 未结 8 812
南方客
南方客 2021-01-31 04:04

How do you tell if a computer\'s monitor(s) are turned on/off from the command line in Linux? I\'ve traditionally thought of monitors as output-only devices, but I\'ve noticed t

8条回答
  •  梦毁少年i
    2021-01-31 04:17

    When using xset it always returns xset: unable to open display ""

    However, "xset dpms force off" & "xset dpms force off" commands actually turn my monitor off and on. I am using the script outlined here -

    http://systembash.com/content/how-to-turn-off-your-monitor-via-command-line-in-ubuntu/

提交回复
热议问题