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:cygwinbin to path in control panel -> system -> advanced -> environmental variables
- console:
- shell is c:cygwinbinbash.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:cygwinbinbash.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