xdpyinfo

Display X server properties and screen information

brewmacoslinux
Try with needOr install directly
Source

About

X.Org: Utility for displaying information about an X server

Commands

xdpyinfo

Examples

check screen resolution and display size$ xdpyinfo | grep dimensions
get color depth and visual information$ xdpyinfo | grep -A 5 'screen #0'
view all X server details$ xdpyinfo
find monitor DPI and pixel density$ xdpyinfo | grep resolution
check X display name and connection$ xdpyinfo -display :0