yash069 / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 0 forks source link

terminal problems with cygwin 1.7 #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install Cygwin 1.7.  The current best explanation of how to do this is
at http://cygwin.com/ml/cygwin-apps/2008-08/msg00079.html.
2. Start a cygwin 1.7 shell, i.e. C:\cygwin-1.7\bin\bash.exe --login
3. Set PS1='\[\033]0;\]\w\[\007\]\n\[\033[1;36m\]$ \[\033[0m\]' .

What is the expected output?  
With PS1 set as above in cygwin 1.5.x, I get a light cyan $ prompt, and the
name of the current directory in the window title bar.

What do you see instead?
- There is no prompt string, as if PS1=''.
- Other text that normally is displayed in colors is all rendered in white.
- The window title bar text is still at the default ('Cygterm - PuTTY').

Which version of PuTTYcyg are you using?  20071202
Which version of Windows?  XP SP3
What version of Cygwin?  1.7.0-29
Do you have a dual-core system or multiple CPUs? No
Any firewall software installed? No

Thanks,
Andrew.

Original issue reported on code.google.com by andrex...@gmail.com on 26 Aug 2008 at 9:34

GoogleCodeExporter commented 8 years ago
What happens if you directly output those terminal codes?

printf '\033]0;/tmp/foo\007\n\033[1;36m$ \033[0m'

Original comment by medgar123 on 20 Oct 2008 at 2:21

GoogleCodeExporter commented 8 years ago
It works as expected:  the window title is changed, and the cyan $ prompt is 
printed.

Another thing that I've just realized about this setup is that my 
~/.bash_profile is
not being executed.  It is executed if I use puttycyg with Cygwin 1.5, or run 
Cygwin
1.7 in a DOS terminal.

Original comment by andrex...@gmail.com on 22 Oct 2008 at 4:06

GoogleCodeExporter commented 8 years ago
Sorry, please disregard the last part of comment 2.  Unrelated to puttycyg.  
Thanks,
Andrew.

Original comment by andrex...@gmail.com on 22 Oct 2008 at 7:20

GoogleCodeExporter commented 8 years ago
Some more information about this issue:

With Cygwin 1.5, I have the terminal type (Connection > Data > Terminal Details 
>
Terminal-type string) set to xterm.  Once I start the shell, I get TERM=xterm.

With Cygwin 1.7, I also have the terminal type set to xterm, but when I start 
the
shell, I find TERM=cygwin.  I've tried resetting TERM=xterm in my 
.bash_profile, but
it doesn't fix the problem.

Could the problem be caused by a difference in Cygwin 1.7's termcap/terminfo or 
other
terminal handling code?  I don't know much about this, but will see what I can 
find out.

Unfortunately, since PuTTYcyg isn't part of Cygwin, questions about how Cygwin 
1.7
affects PuTTYcyg are likely to be met with indifference at best from the Cygwin
maintainers.  But I'll try.

Andrew.

Original comment by andrex...@gmail.com on 5 Nov 2008 at 8:23

GoogleCodeExporter commented 8 years ago
termcap and terminfo are identical in Cygwin 1.5 and 1.7.  So the problem 
doesn't
seem to lie there.

Original comment by andrex...@gmail.com on 5 Nov 2008 at 8:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
PuTTYcyg does not fully support Cygwin 1.7, especially if you have Cygwin 1.5
installed on the same system.  See
http://code.google.com/p/puttycyg/issues/detail?id=12.  This should be fixed 
before
Cygwin 1.7 is released, but I can't guarantee that.

Original comment by medgar123 on 21 Jan 2009 at 9:08

GoogleCodeExporter commented 8 years ago
Merging all Cygwin 1.7 issues.

Original comment by medgar123 on 21 Jan 2009 at 9:13

GoogleCodeExporter commented 8 years ago
Cygwin 1.5 and 1.7 run side-by-side with no conflict, so I don't think that's 
part of
this issue.  The only exception that comes to mind is if someone had a mix of 
the two
in their PATH and/or other environment variables.

Original comment by andrex...@gmail.com on 31 Jan 2009 at 2:34

GoogleCodeExporter commented 8 years ago
I'm not sure how you are using Cygwin 1.7 with PuTTYcyg, since it cannot use 
Cygwin
1.7 without some tweaking.  See 
http://code.google.com/p/puttycyg/issues/detail?id=16.

Original comment by medgar123 on 2 Feb 2009 at 10:10