Can't Get Xterm to Work. Display Not Set.
Here Are My Settings: $ Xterm Xterm Xt Error: Can't Open Display: Xterm: Display Is Not Set $ Echo $Display $ Cat /Etc/Ssh/Sshd_Config | Grep X X11Forwarding...
Here are my settings:
$ xterm
xterm Xt error: Can't open display:
xterm: DISPLAY is not set
$ echo $DISPLAY
$ cat /etc/ssh/sshd_config | grep X
X11Forwarding yes
X11DisplayOffset 10
4 Answers
You need to use the -X flag
ssh -X user@server
In my case I was missing the xauth program on the target machine
How to debug these situations:
On the target host, run another sshd daemon to debug on another port:
/usr/sbin/sshd -d -p 222On the source host:
ssh -v -Y phil@192.168.0.14 -p 222
In my situation I could see:
debug1: Remote: No xauth program; cannot forward with spoofing.
(Note: to run sshd on another port you may need to modify or temporarily disable iptables : /etc/init.d/iptables stop, or equivalent)
Try with this command:
DISPLAY=:0 xterm
Did you run vncpasswd in the account you used to write the configuration file?
I had this problem because I configured the root account but the vnc user is another, run the vncpasswd again in the right account and everything will be ok.