Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working with machines that are running RHEL6. I need to detect whether a monitor is plugged in when X is either not running or has not started yet, for example during bootup. Is there any way to do this? lspci shows video drivers and other hardware, for instance, but that's the closest I've been able to come so far to detecting monitors without going through X.

share|improve this question
I don't have an answer, but would it be acceptable to depend on X being installed (though not starting all of it)? Maybe there's a tool in there somewhere that will help... – Michael Kjörling Mar 20 '13 at 14:39
Apologies for taking a year and a half to answer, but yes, it is acceptable to use X tools/utilities even if the X server is not running. – jayhendren Dec 8 '14 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.