I'm running Ubuntu 18.04.1 LTS Desktop.
I'm connecting to the desktop via remote SSH session.
I'm trying to get the current resolution for the currently active local session.
I found these seemingly relevant questions:
However, xdpyinfo returns the following error:
xdpyinfo: unable to open display "".
and xrandr returns a similar error:
Can't open display
I'm assuming this is because there is no display connected to my remote SSH session. I've tried switching (su) to the same user as the local session, but the error is the same - I assume for the same reason: no display related to that SSH session.
So, I tried the suggestions from my third link above.
$ export DISPLAY=:0
$ xdpyinfo
No protocol specified
xdpyinfo: unable to open display ":0"
and
$ xrandr --display :0
No protocol specified
Can't open display :0
How can I poll the display on the active local session for resolution (dimension) info from a remote SSH session?