On my device A, i'm running x11 with dwm. I want to ssh into device A from device B and get the xprop output for the window i've focused on the device A. When I'm in the terminal on device a in dwm, execute xprop -id "$(xdotool getactivewindow)"
in my terminal emulator, I get the xprop output of my terminal emulator. However, when I execute this command via ssh i get this output:
Error: DISPLAY environment variable is empty. Is there an Xorg or other X server running? You can try setting 'export DISPLAY=:0' and trying again.
Failed creating new xdo instance.
xprop: unable to open display ''
When i do export DISPLAY=:0
(:0 is the value of $DISPLAY when i check it in the terminal emulator on device A), the above command produces the fowllowing error:
Authorization required, but no authorization protocol specified
Failed creating new xdo instance.
Authorization required, but no authorization protocol specified
xprop: unable to open display ':0'
How do i fix this (specify an authorization protocol or whatever is neccessary)?