9

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.

pvaesrtdoe
  • 525
  • 5
  • 17
Rumel66
  • 91
  • 1
  • 3
  • 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
  • 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

2 Answers2

15

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.

ravery
  • 6,824
  • 5
  • 21
  • 40
-1

There is an alternative method by typing these commands:

su -

gedit

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

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

Prateek Agrawal
  • 275
  • 1
  • 2
  • 11