How to Fix xterm Xt error: Can’t open display: xterm: DISPLAY is not set

When you run xterm, an error occurs as follows:
xterm Xt error: Can’t open display:
xterm: DISPLAY is not set
My system CENTOS6.2
Solutions:
1. First, make sure you have x11: yum-y install xorg-x11-xauth
2. Secondly, modify the configuration file: /etc/ssh/sshd_config
AllowTcpForwarding yes
X11Forwarding yes
ForwardX11 yes or (ForwardX11 trusted)

3. Restart


Read More: