Link to home
Start Free TrialLog in
Avatar of xiaoyunwu
xiaoyunwuFlag for United States of America

asked on

putty with vi result

When I use secureCRT, I can edit a file use vi and after I exit vi, I can see what was in the file. But if I use putty, then after I quit vi, I can't see what's in the file. It hides all the file from editor.
Avatar of dfke
dfke

Set all colour settings to default in Putty, maybe that helps.
Say for instance you're running 'vipw' as root and you edit /etc/shadow. Now after closing the encrypted passwords remain displayed on your screen for anyone to see. Would that be preferable or even wise? A terminal emulates a console. It is not the same and it may not behave the same (it might have scroll-back buffers). A good terminal should adhere to any escape sequences and clean up on closing an editor or pager. This IMHO is not behaviour you should rely on, or even worse, should *want* to change.
Avatar of xiaoyunwu

ASKER

I understand what you say, unSpawn.

I usually only edit common file, and it's convenient. Is there a way?
It depends on the TERM emulation set for your session.   If you change the TERM emulation to 'ansi'(for example) for your putty session, then your problem will be solved.

$ export TERM=ansi

Note: Other programs might not like the 'ansi' terminal emulation, and may display erratically.
ASKER CERTIFIED SOLUTION
Avatar of pmasotta
pmasotta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Pmasotta, It's worked after I changed the setting as you told.