X11 connection rejected because of wrong authentication when using sudo

Solution 1:

Found an answer here: https://www.slothparadise.com/sudo-root-x11-connection-rejected-wrong-authentication/

For whatever reason, Xauthority isn't being passed over on sudo. But... sudo xauth merge ~/.Xauthority then sudo graphical-app works fine.

I think this is unrelated to ssh, just to Xauth and sudo.