www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/06/14:14:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <m2xeb3a2d501004060031m2b1f8bb2y914a8299c1617245@mail.gmail.com>
References: <m2xeb3a2d501004060031m2b1f8bb2y914a8299c1617245 AT mail DOT gmail DOT com>
Date: Tue, 6 Apr 2010 19:14:23 +0100
Message-ID: <l2q416096c61004061114tb8723c6dlcb2b28ed1e3c0168@mail.gmail.com>
Subject: Re: mintty - changing colours when logging in to remote host
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
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

Gary:
> Is it possible to change the colour scheme when connecting to a remote
> system, to remind me where I am actually "running"?

Yes. There are control sequences for changing the colours, so you
could do this with the appropriate echo commands in your remote login
script. Or you could have a local script that changes colours before
connecting to the remote system. For example, to set the background
colour to dark red:

echo $'\e]12;64,0,0\a'

Alternatively, you could invoke the remote connection directly from a
shortcut and configure the colours by setting the shortcut target to
something like this:

C:\cygwin\bin\mintty.exe -o BackgroundColour=128,0,0 /bin/ssh server

See the mintty manual for further information. The xterm documentation
at http://invisible-island.net/xterm/ctlseqs/ctlseqs.html has the full
details of those control sequences (look for "Operating System
Controls").

Andy

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019