8

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

7

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

  • Perfect, thanks! I wound up using "xdpyinfo | grep dimensions" – Brad Aug 24 '11 at 21:24
4

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:'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.