Determine resolution of a display on a remote systyem?

How can I determine the resolution of a display on a remote system. If I use xrandr it displays the resolution of my local screen:

[email protected]:~$ ssh -X road
[email protected]'s password: 
Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-16-generic i686)
[email protected]:~$ xrandr 
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192
VGA-1 connected primary 1440x900+0+0 (normal left inverted right x axis y axis) 370mm x 230mm
   1440x900      59.89*+
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
HDMI-1 disconnected (normal left inverted right x axis y axis)

Answer

ssh into your server then export your local display (echo $DISPLAY):

export DISPLAY=:0

Then run xrandr

or simply run

DISPLAY=:0 xrandr

Leave a Reply

Your email address will not be published. Required fields are marked *