This command sets the display environment variable to :0, sets the Xauthority environment variable to the user's home directory, and then runs the xset command to query the current settings of the X server.
env DISPLAY=:0 XAUTHORITY=~/.Xauthority xset q