Home arrow News arrow AIX News arrow Set window title for xterm
Set window title for xterm PDF Print
Written by Frank Schalude   
Saturday, 31 May 2008
Use this little script to set your window title in an xterm window:
Save it in a script, e.g. title.sh

title.sh without any parameter will set the window title to the hostname.
If any commandline parameter is given, the window title will be set to th whole string ($*).


#!/bin/sh
[ $# -ne 0 ] && export TITLE=$* || {
export TITLE=$(hostname)
}
echo "\033]0;$TITLE\007"


Works with Linux and AIX (should work with any UNIX-like system).
 
< Prev   Next >
Copyright © 2008 www.isarlab.de