I use Ubuntu 17.10.

When I start gedit, virt-manager as root I get a dubious error message: gtk warning cannot open display :0.0

I read many posts but none works with Ubuntu 17.10.

Thanks for any help.

marked as duplicate by karel, Eric Carvalho, Martin Schröder, Charles Green, ravery Feb 10 '18 at 14:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Other root applications are broken on Wayland too (see bug 1713313 and bug 1713311 ). – N0rbert Oct 22 '17 at 10:47
  • I use the new AMD Cpu with Gigabyte so i need Kernel 4.10 >. Thans i read this post and it is now clear. – Rumel66 Oct 22 '17 at 16:05

By default 17.10 does not allow root to access your display.

Try the command xhost +si:localuser:root then launch gedit with root privilege.

  • I got the same error message when i set the xhost local:root. – Rumel66 Oct 22 '17 at 11:09
  • try xhost +si:localuser:root seems thy changed the command also – ravery Oct 22 '17 at 11:12

There is an alternative method by typing these commands:

su -


When you will type 1st command, It will prompt for the password.

Note that by this way gedit will open as the root user.

Not the answer you're looking for? Browse other questions tagged or ask your own question.