Generally speaking, it's an error to type a command to set the DISPLAY variable, or to have such a command in your .profile or .cshrc or .login or whatever. Normally, especially these days, if the variable is not set automatically then there is no correct setting which will work.
When you log in from one machine to another with ssh, the ssh protocol includes forwarding of the X-Windows protocol. There is a command-line option '-X' (capital X) to ask ssh to forward x-windows requests. In fact this is not the default in the current ssh distribution, although it's usually locally configured as the default.
If you log in to a machine with ssh and you find that X-Windows programs don't work, the first thing to do is to check that your DISPLAY variable is set (by typing "echo $DISPLAY").
If it is not set, normally the next step is to log out and type "echo $DISPLAY" in the shell into which you typed the 'ssh' command, and see if it's set there.
If it is set there, then repeat the 'ssh' command but add the '-X' option, and see if that does it.
If it is not set even in this outer shell, then '-X' won't help. There's no X-Windows connection to forward. Perhaps you logged in there from somewhere else; log out a further step and repeat. Otherwise, something is wrong with the configuration of the X server you are using, or actually you're not running X-Windows (e.g. I'm typing this right now in the "Terminal" application program on my Macintosh, and that's not X-Windows), or perhaps you have a local configuration in your dotfiles (e.g. .cshrc or .bashrc) which mangles the DISPLAY variable. You might want to ask me for help with diagnosing this.
Any questions, please ask (preferably by e-mail).