I'm trying to run
gparted on my Raspberry Pi. After logging in with
ssh -X pi@pi and trying to run
sudo gparted, I get the error message...
X11 connection rejected because of wrong authentication.
When I try
xauth list, nothing is shown, meaning that the xauth file is missing. What is the easiest way of getting the X11 forwarding to work?
Edit: I tried the suggestion from below, but the first step already fails:
root@raspberrypi:~# xauth list $DISPLAY
xauth: file /root/.Xauthority does not exist
How do I generate this file?