I have hit this problem in the past.
The problem is that the X server is setup to be only accessible by a user who has the right "MIT magic cookie" in their .Xauthority file and root doesn't have it (only pi does).
One fix is to add pi's magic cookie to root's .Xauthority file. I have it written down somewhere how to do this, but don't recall it ATM. It involves using the -merge option in one of the tools.
Another approach, which actually works and is easy to do - even if it is sort of weird is:
then when logged in via ssh, sudo to get a root shell and then run gparted.
Another is something called "gksudo", but I've never investigated that.
The problem is that the X server is setup to be only accessible by a user who has the right "MIT magic cookie" in their .Xauthority file and root doesn't have it (only pi does).
One fix is to add pi's magic cookie to root's .Xauthority file. I have it written down somewhere how to do this, but don't recall it ATM. It involves using the -merge option in one of the tools.
Another approach, which actually works and is easy to do - even if it is sort of weird is:
Code:
$ ssh -Y localhost
Another is something called "gksudo", but I've never investigated that.
Statistics: Posted by BigRedMailbox — Sun Jan 12, 2025 2:28 pm