A possible solution is to do this via a startup script of your shell on the server side.
Depending on the shell, it may or may not source some script(s) when started as an interactive shell by an SSH server. In case of Bash the script is ~/.bashrc.
I assume your shell on the server side does source some script. If I were you, I would define the variable there. First I would check if SSH is involved, next if $DISPLAY expands to an empty string (in case it's already set because of ssh -X), then I would set it. The code may be:
[ -n "$SSH_CONNECTION" ] && [ -z "$DISPLAY" ] && export DISPLAY=local-ip:10.0
$SSH_CONNECTION is explained and used less trivially in this another answer.
Note in some circumstances the startup script may return early. E.g. in this answer, twist number 3. Note the linked answer is about non-interactive shells and your ssh username@remote-ip gives you an interactive shell; still in general the startup script may contain some logic that allows it to return early for some reason. It may also already contain DISPLAY=…. Inserting the above code at the end may be wrong if there's return. Inserting the above code at the beginning may be wrong if there's DISPLAY=…. In general you need to understand the logic of the startup script and insert the above code in the right place. When in doubt, insert at the beginning and see if it works.