This question is related to How to fix "MobaXterm X11 proxy: Unsupported authorisation protocol", but the answer there did not work for me.
I use MobaXterm to ssh from a Windows PC to a Linux PC, and I know that MobaXterm has a X11 server which allows GUI applications spawned in the Linux environment to appear in the Windows environment (sorry if my terminology is clunky).
I want to run baobab because I want to analyze disk space hogs. I guess I need to run sudo baobab because otherwise baobab reports permission errors and isn't useful.
Problem/question: if I run baobab the gui appears, but if I run sudo baobab, I get this error:
$ sudo baobab
[sudo] password for user:
MobaXterm X11 proxy: Unsupported authorisation protocol
Unable to init server: Could not connect: Connection refused
(baobab:219372): Gtk-WARNING **: 13:54:54.003: cannot open display: localhost:10.0
I get the same result with firefox vs sudo firefox.
What is the problem, and how do I work around it?
I've already tried the xauth add suggestion at the linked post. Display port 10 was already listed to begin with, but I added a new entry anyway, and it didn't make any difference:
$ xauth list
linxbox/unix:1 MIT-MAGIC-COOKIE-1 090ae067d5c16d139a64536f9c5d758e
linxbox/unix:2 MIT-MAGIC-COOKIE-1 3e67e02956713af7560d0ecb34e159b4
linxbox/unix:12 MIT-MAGIC-COOKIE-1 473351e10715668bf13345d24835671f
linxbox/unix:11 MIT-MAGIC-COOKIE-1 5f005e7a67371788e58f9a605132a3cf
linxbox.company.com:1 MIT-MAGIC-COOKIE-1 090ae02bd5676d099134536f9c5d758e
linxbox/unix:10 MIT-MAGIC-COOKIE-1 988522a45f0b77bf4567ceb132f4e0d8