* TERM=vt220

Posted on August 29th, 2008 by doug. Filed under Uncategorized, shell.


 

console2 with cygwin bash shell and ssh behind it (and a lot of other UNIX commands too, like ls, and find and grep and awk and gpg…) has turned out to be a good solution.

I discovered that cygwin sets the terminal as TERM=cygwin. That plays hell with vi on SUN servers. I found that setting “export TERM=vt220″ in .profile (this is SUN Solaris 10) resolved vi, getting the console2 window to show the display correctly, and letting the arrow keys work again.

A second gotcha - DON’T set ctrl-c as copy in the hot-keys. That ctrl-c you use to break out of errant commands or scripts stops working at all, very disconcerting. Instead map shift-ctrl-c. There’s an alpha feature enabling tranparency - looks cool, but isn’t stable. Ctrl-r (history searching in bash) is mapped to renaming the tabs for console windows - you’ll set that to ctrl-alt-n as below and resolve that.

Here are the settings in console2 I’ve found to come very close to what I use in Konsole in KDE:

  • base underneath is cygwin - therefore need “export TERM=vt220″ in .profile to have vi behave on SUN - run on command line initially to test and to edit .profile…
  • add “c:\cygwin\bin to path in control panel -> system -> advanced -> environmental variables
  • console:
    • shell is c:\cygwin\bin\bash.exe
    • working directory is c:\
    • buffer size Rows is 5000, columns is 0
  • appearance:
    • more - set tabs to always be present (uncheck “hide single tab”)
  • behavior:
    • check copy on select
    • check clear selection on copy
    • select UNIX LF
  • map hotkeys to emulate konsole
    • shift-left for previous window
    • shift-right for next
    • ctrl-alt-n for new windows
    • ctrl-alt-s for rename
    • shift-up arrow for line up
    • shift-arrow down for line down
    • shift-page-up for page up
    • shift-page-down for page down
    • shift-ctrl-c for copy
    • ctrl-v for paste
  • mouse:
    • right button to paste
    • set copy on select
    • left button to select
    • copy/clear selection is “none”
  • tabs:
    • set shell as C:\cygwin\bin\bash.exe
    • working directory is C:\

 

— dsm

 


 

UPDATE 20080904: I installed console2 on all of my windows machines (dual boot, except for work). It worked perfectly - then a co-worker tried it out and had issues. He searched and found that in some instances cygwin’s bash shell refused to complete loading and never returns a command prompt. The solution looks to be a reinstall or upgrade of cygwin, or possibly some difference in the way cygwin was installed.

I laughed and said, “It works for me.”

He said, “You can tell when you work in an IT shop - when something fails for someone, you always get that response - “It works for me.”"

 

Update 20090329 Sunday

export TERM=ansi

I installed eclipse with Remote System Explorer. vt220 caused VI to fail to refresh (at least SUN’s crippled vi version). ansi worked much better within RSE.

— doug

 

share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Bloglines
  • email
  • Facebook
  • Faves
  • LinkedIn
  • Mixx
  • Netscape
  • Newsrider
  • Slashdot
  • Technorati
  • TwitThis

Tags: ,



Trackback URI | Comments RSS

Leave a Reply


CAPTCHA image

engineers

recent posts

What I'm Doing...

  • finished and deployed svnadmin.pl cgi, documented it and checked into subversion... next is more log4j edits, and deploy jsvn (java svn)
    2009-05-08
  • ...the framework is there, just coding the rest, the actual inputs and pages
    2009-04-28
  • CGI.pm - again - re-discovering the framework for a multi-page CGI script for internal management of SVN repositories and users
    2009-04-28
  • More updates...

Posting tweet...

categories

archives

tag cloud

admin