I get this wierd error when I run applications as root.
**(gedit:630): WARNING **: could not open X display
No protocol specified
Unable to init server
(gedit:630): Gtk-WARNING **: Cannot open display: :0.0
I'm using Arch Linux. I use su - to login as root. And this error comes when im running the X server. Also if i copy .Xauthority into the /root/ it works without error.
sudo?su? Login as root?), we need to know your OS and distribution, and we need to know if you are logged in physically or remotely and if there is a running X server when you get that error. Also have a look at this answer. – terdon Jul 04 '14 at 08:53