Ricardo Campos wrote:
If I su to root in a terminal, and try to edit a file using emacs, I get the following error:
Xlib: connection to "X0.0" refused by server Xlib: client is not authorized to connect to server emacs: cannot connect to Xserver :0. Check the DISPLAY environment variable or use '-d'
You can use sudo and get around this (i.e. "sudo emacs <filename>"). I use this most of the time when i need to run a program that uses X as root, but sometimes it's easier to su to root fully. I've been doing "xhost +localhost" up till now, but Paul's idea of "su -m" works as well ("su -" didn't tho, still got the error).
Andrew