I've been searching for a permanent solution for some time now, but the threads containing the same error message never seem to be about the same issue.

I want to:
I'm not trying anything fancy, all I want to do is open a write-protected file with gedit as root, like so:
# sudo gedit /usr/bin/deadbeef
..but every time I try, no matter the file, I get this error message:
(gedit: [process #] ): Gtk-WARNING **: cannot open display
I already know:
I can circumvent this by going:
# xhost +local:root
# sudo su
# export DISPLAY=:0.0
..or something along those lines

I have no idea why this is necessary, it's stupidly inconvenient to say the least
This has been happening since I first installed openSUSE, so I haven't screwed up anywhere in the process.