How to query X11 display resolution?

前端 未结 7 860
一整个雨季
一整个雨季 2021-02-05 09:24

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?

7条回答
  •  醉话见心
    2021-02-05 10:22

    For modern X servers, there's also the XRandR extension, which provides the most up-to-date model of multi screen layout information, including overlapping screens and dynamic screen changes.

    Documentation of it is available in the XRandR 1.3.1 Protocol spec and the libXrandr man page.

提交回复
热议问题