Re: Which environment variable?
On Monday 14 January 2008 09:35:41 Matiss wrote: Is there such environment variable, which changes window title for putty? No there is no such variable, that I am aware of. You just have to send some control characters to the terminal to change its title. How to send these characters really depends on your shell. How do I change that title to let's say server name for my shell? You could use something like this in your ~/.bash_profile if you use bash. echo -en \033]0;`hostname`\007 The above sends: 1) ASCII \033 2) ] 3) 0 4) ; 5) the_hostname 6) ASCII \007 The idea is that you should initiliaze the xterm's title at login time. Check the page below for your favorite shell. There are even two workaround in Perl and C in case your shell has no easy way to send the control characters. http://tldp.org/HOWTO/text/Xterm-Title HTH, Nikos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Which environment variable?
On Mon, 14 Jan 2008 09:35:41 +0200 Matiss said: Is there such environment variable, which changes window title for putty? I mean, MC is able to change it to working dir I think.. How do I change that title to let's say server name for my shell? Thanks :) man xprop Or for the terminally lazy, cat xtitle #!/bin/sh # # gets/sets xterm title # me=`basename $0` usage=Usage : $me [pwd | new title ... ] ('pwd' sets it to the current directory); Adjective='Current' while [ $# -gt 0 ] do case $1 in --help | -help | -h | -\?) echo; echo $usage; exit 0;; -*) echo $me: Unrecognized switch: $1 ($me -help to show valid options); exit 1;; pwd) Adjective='New'; Title=`pwd`;; *) Adjective='New'; Title=$1; while [ $# -gt 1 ] do shift;Title=$Title $1; done;; esac shift done if [ -n $Title ] then xprop -id $WINDOWID -set WM_NAME $Title; fi Title=`xprop -id $WINDOWID | grep WM_NAME | cut -d= -f2` echo $Adjective 'title :' $Title exit 0 -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Which environment variable?
On Mon, Jan 14, 2008 at 09:35:41AM +0200, Matiss wrote: Is there such environment variable, which changes window title for putty? I mean, MC is able to change it to working dir I think.. How do I change that title to let's say server name for my shell? I think what you are referring to is the Xterm title so you need to do that using Xterm stuff. I set the titles in my xinitrc file. There is probably something you can do on the fly too, but I have never tried it. But, anyway, look at setting Xterm window titles. jerry Thanks :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]