Are you sure &term matches "linux"? "linux" is the value of TERM
set by a Linux console. Most terminals set TERM to "xterm". Tmux
sets TERM to "screen". (Vim sets &term to $TERM if TERM is set.)
You might try setting &t_ti and &t_te unconditionally and see if
that helps.
That said, I'm surprised that this doesn't "just work" for you. I
am currently running vim in a tmux window over ssh. The local
terminal is GNOME Terminal 2.32.0. The values of 't_te' and 't_ti'
automatically set by vim are:
t_te=^[[?1049l
t_ti=^[[?1049h
What is your remote operating system? What terminal are you running
locally? Before you override them, what does vim say the values of
'term', 't_te' and 't_ti' are?
Regards,
Gary