If you put the definition in a .profile or a .kshrc or /etc/profile that gets interpreted by the ksh. However, if you put in in /etc/environment it is just assigned.
So, in /etc/environment
MORE=-W notite
and in /etc/profile
export MORE="-W notite"
The reason is when ksh interperts it you do not want it to assign only -W
an alternative would probably work
export MORE=-W\ notite
As a test, compare the output of
set | grep MORE
and compare the result of MORE=-W notite and MORE="-W notite"
I am getting - on AIX 6.1
michael@x054:[/home/michael]. /etc/environment
michael@x054:[/home/michael]set | grep MORE
MORE='-W notite'
michael@x054:[/home/michael]grep MORE /etc/environment
MORE="-W notite"
and on AIX 7.1
root@x107:[/home/root]. /etc/environment
root@x107:[/home/root]set | grep MORE
MORE="-W notite"
root@x107:[/home/root]grep MORE /etc/environment
MORE="-W notite"
And, it works even with the quotes on AIX 6.1, but only without the quotes on AIX 7.1
Hope this clarifies any misunderstanding.
last update: seems the issue is a lot less on AIX 6.1 - because fewer programs are using the alternate window approach.
---------- Post updated at 09:51 PM ---------- Previous update was at 09:46 PM ----------
Thank you -=XrAy=- and jandersen.
My personal preference is to not change my term definition to something it is not. However, will adding my comments above and thinking about the vim comments I nee to read the string/command options -W notite as -W no ti te so I shall look into the terminal definitions and vi documentation (if I can find any) telling me how to disable the termcap variables ti and te as I am assuming this is why the definition xterm-r5 is working - the two variables are not defined.
---------- Post updated at 10:14 PM ---------- Previous update was at 09:51 PM ----------
My solution - thank you all for the discussion - is to redefine the terminal emulation my ssh client is reporting. It was saying xterm (forget when I changed that). It is now back to vt320 as default.
p.s. found a very good article on terminfo and termcap here: Fixing the alternate screen problem - Sec, blogmal! - tidbits/titeinhibit.story