I've been searching around on Google but I cannot find my answer on how to create a new MIT-MAGIC-COOKIE.
I recently did a reinstall and I had copied over my files from a backup back into my home folder, and now I can't open up nemo file manager whenever I run sudo
or doing with Open as Root
on it because it's giving me;
Could not open X display
Invalid MIT-MAGIC-COOKIE-1 keyerror: XDG_RUNTIME_DIR not set in the environment.
Everywhere I looked up it was only giving me answers on how to forward a MIT-MAGIC-COOKIE for SSH. I want to know how to RE-create a NEW magic cookie to replace the invalid one. Some places I read up on says to do
rm ~/.Xauthority
but this isn't fixing anything for me. What are the steps I need to do to create a new magic cookie?