How can I determine X resolution from CLI without randr?

9,692

Solution 1

you can grep output of xdpyinfo or xwininfo -root or xprop -root.

Solution 2

I'm not sure if xdpyinfo uses RANDR:

xdpyinfo | grep dimensions:

This one assumes the root window's size is the resolution:

xwininfo -root |egrep 'Width:|Height:'
Share:
9,692

Related videos on Youtube

Brad
Author by

Brad

Updated on September 18, 2022

Comments

  • Brad
    Brad over 1 year

    Does anyone know of a way to determine the current X resolution from the command line, without using randr?

  • Brad
    Brad over 12 years
    Perfect, thanks! I wound up using "xdpyinfo | grep dimensions"