Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty? Commented Jan 7, 2013 at 8:31
  • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me. Commented Jan 7, 2013 at 9:01
  • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/… Commented Jan 7, 2013 at 9:01
  • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment. Commented Jan 7, 2013 at 9:04
  • 1
    Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file. Commented Mar 4, 2015 at 10:12