How to query X11 display resolution?

前端 未结 7 859
一整个雨季
一整个雨季 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:17

    This might be helpfull for cli and scripting

    xwininfo -root
    

    But xRandR might be more accurate, especially, when there is multiple monitor environment:

    xrandr
    

提交回复
热议问题