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.

Rumel66
  • 91

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,874
-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.