how can i change the color of xterms that connected with ssh to unix account

Phil Betts Phil.Betts@ascribe.com
Fri Dec 21 18:23:00 GMT 2007


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/



More information about the Cygwin-xfree mailing list