3

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?

1 Answers1

-1

found a proper answer solution that actually works;

by doing the following in terminal

grep 'pam_xauth.so' /etc/pam.d/*  | awk -F ":" '{ printf "%s\t(%s)\n", $2, $1}'

and if that didn't work I did this which did work;

Defaults env_keep=DISPLAY

into /etc/sudoers then logged out and back in again, and vĂ²ila it worked!