This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
RE: how can i change the color of xterms that connected with ssh to unix account
- From: "Phil Betts" <Phil dot Betts at ascribe dot com>
- To: <cygwin-xfree at cygwin dot com>
- Date: Fri, 21 Dec 2007 18:22:54 -0000
- Subject: RE: how can i change the color of xterms that connected with ssh to unix account
- Reply-to: cygwin-xfree at cygwin dot com
Meir Yanovich wrote on Wednesday, December 19, 2007 2:51 PM::
> Hello all
> Im new to cygwin and X im using the
> cygwin\usr\X11R6\bin\startxwin.bat for simple x display
> for using the unix tools in windows and to connect with ssh to unix
> accounts
> now i like to be able to change the color of the xterm every time I
> connect with ssh to remote host
> can it be done ?
> Thanks
To change the xterm background to pink, use this command:
$ echo -e '\e]11;pink\007'
To do this automatically when you log in via ssh, add the following
to your .bash_profile on the remote host.
if [ ! -z "$SSH_TTY" ];then echo -e '\e]11;pink\007';fi
To ensure this only happens on interactive shells, change the first
part to:
if [[ $- == *i* ]] && [ ! -z "$SSH_TTY" ];then ...
Read the file /usr/share/doc/xterm-229/ctlseqs.txt for other escape
sequences you can use to control xterm.
Phil
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/