1

I upgraded to Ubuntu 17.10. Now when I run

sudo gedit

I get the error

Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0

How to fix it?

Zanna
  • 70,465

1 Answers1

1

Run:

xhost local:user1

(Replace user1 with your username.)

Eliah Kagan
  • 117,780
  • sudo=root not user: xhost local:root. and this command may not work on waylnd which is default for 17.10 – ravery Oct 21 '17 at 08:43
  • in my case I use "xhost local:tom" and it works. –  Oct 21 '17 at 09:24
  • 1
    then your .Xauthority has xhost local:root in it. you should correct your answer so that is applies to more users. – ravery Oct 21 '17 at 09:27
  • I think it is a poor quality answer as it throws out a command without explanation or information on how to reverse the command – Panther Oct 21 '17 at 13:19
  • xhost +local: does it –  Feb 18 '18 at 21:05