delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 |
X-Spam-Check-By: | sourceware.org |
Date: | Wed, 17 Mar 2010 12:21:01 -0700 |
From: | Gary Johnson <garyjohn AT spocom DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Cygwin Terminal Type |
Message-ID: | <20100317192101.GA10232@KCJs-Computer> |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <3a9cd7651003171119h517909a6r3c6017eca4f8379 AT mail DOT gmail DOT com> |
Mime-Version: | 1.0 |
In-Reply-To: | <3a9cd7651003171119h517909a6r3c6017eca4f8379@mail.gmail.com> |
User-Agent: | Mutt/1.4.2.2i |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 2010-03-17, Nick Calvert wrote: > Hi all, > > This is a border line flame worthy question as I´m acting as a proxy > for a developer. Please go easy... > > I have an elaborate, slightly dirty but fully functional system in > place whereby Windows machines are automated via a Linux Ruby > application over SSH. Historically we haven´t used the cygwin ssh > server on Windows clients as we had some issues with output when > running anything Powershell. We have now managed to fix this by > issuing commands from a Cygwin bash prompt like: > > echo . | powershell function-name > > All good. The problem we now face is that the `raw´ terminal output > the Ruby ssh library sees is full of control character, this can make > it difficult to read the output of any commands we run. > I was thinking that perhaps specifying a terminal type that doesn´t > support colours (or even just `dumb´) would lessen the control > characters but I can´t get this to work. No matter what terminal type > we specific in the Ruby SSH library the same control characters > present themselves, if I run a test from PuTTY, ssh´ing to Cygwin sshd > and specifying vt100 or dumb as a terminal type, I still see a > coloured prompt which would seem to suggest I haven´t changed the > terminal type at all? > Could someone kindly point me in the right direction? The colored prompt results from escape sequences embedded in the PS1 variable. Cygwin sets the value of PS1 in /etc/profile according to the shell being used, but not according to the terminal type. You could override this by putting something like PS1='$ ' in your ~/.profile, perhaps conditionally on $TERM or $SSH_CLIENT. HTH, Gary -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |