If you are trying to open gedit from the terminal in centos you gor probably a Gtk-WARNING
Similar to this :
[root@www ~]# sudo gedit
No protocol specified
(gedit:4368): Gtk-WARNING **: cannot open display: :0.0
To fix this issue :
With ROOT
[root@www]# export DISPLAY=:0.0
(Normal user)
[kbilel@www ~]$ xhost +local:root
non-network local connections being added to access control list
Now problem fixed ^^