Sounds like root cannot use the Xserver. As user try:

xhost local:

Then root should be able to use the X server. For a permanent fix:

apt-get update && apt-get install sux

Of course ther ARE editors that don't need Xwindows too!