[harry@localhost home]$ emacs
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.
网上找到的解决方法是;
[root@localhost home]# xhost local:harry 回车
non-network local connections being added to access control list
OK.