sudo as root X11 connection rejected because of wrong authentication

I received this problem recently when I logged into root on a machine. X11 connection rejected because of wrong authentication How did this problem happen? Here’s what I did. ssh -X [email protected] sudo su xclock X11 connection rejected because of wrong authentication If I open xclock as a user, then X11 works just fine. As a result, … Continue reading sudo as root X11 connection rejected because of wrong authentication