dicroce dicroce - 1 year ago 201
Linux Question

How to query X11 display resolution?

It seems like an simple problem, but I can't find the answer: How do you query (via X11) what monitors exist and their resolutions?

Answer Source

Check out display macros and screen macros from the Xlib manual.


  • From the first link: ScreenCount(), ScreenOfDisplay()
  • From the second link: WidthOfScreen(), HeightOfScreen()
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download