I've done what you said and the following happens,
linux2% export DISPLAY=18.104.22.168:0.0
export: Command not found.
linux2% setenv DISPLAY 22.214.171.124:0.0
linux2% emacs test.cpp &
linux2% emacs: Cannot connect to X server 126.96.36.199: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.
I wasn't sure about the last one so I didn't do that. I'm not too familiar with linux so I couldn't locate the ip of my server.
I hope its not just user error....