Hey, I just setup a home server for files and media, so on, but I can't seem to get X11 forwarding setup. At first DISPLAY wasn't being set, so I put this into my .bashrc
Code:
if [ ! $DISPLAY ] ; then
if [ "$SSH_CLIENT" ] ; then
export DISPLAY=`echo $SSH_CLIENT|cut -f1 -d\ `:0.0
fi
fi
Now I get what I believe to be the proper DISPLAY variable, but I still get the same error. I've seen all sorts of "solutions" to what seems to be the same problem. I have 'X11Forwarding yes' in my /etc/ssh/sshd_config file, and I have 'AddressFamily any' as well because apparently disabling IPv6 can break X11 forwarding. At this point, I'm think that it could be that I'm ssh-ing from a Mac(10.10 Yosemite, OpenSSH_6.2p2), but I've done it before, so I'm really not sure.
EDIT: It turns out it wasn't a server side issue, it was client side. Mac OS X Yosemite doesn't actually come with an X Server, it just comes with a dummy icon that when you click it brings you to the page to install XQuartz. Once I did that, everything worked fine.