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
  • 69,223
  • 56
  • 216
  • 327
  • Other root applications are broken on Wayland too (see [bug 1713313](https://bugs.launchpad.net/bugs/1713313) and [bug 1713311](https://bugs.launchpad.net/bugs/1713311) ). – N0rbert Oct 22 '17 at 10:47

1 Answers1

1

Run:

xhost local:user1

(Replace user1 with your username.)

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
  • 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