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:'
Related videos on Youtube
Author by
Brad
Updated on September 18, 2022Comments
-
Brad over 1 year
Does anyone know of a way to determine the current X resolution from the command line, without using randr?
-
Brad over 12 yearsPerfect, thanks! I wound up using "xdpyinfo | grep dimensions"