--- /dev/null
+# $Id$
+#
+# Set the title of an xterm to the hostname.
+#
+
+SSH_FORWARDED=$(get_remote_ip -n)
+if [ ! -z "$SSH_FORWARDED" ]; then
+ if [ ! "$SSH_FORWARDED" = "10.99.10.121" -a ! "$SSH_FORWARDED" = "ip01pc" ]; then
+ SSH_FORWARDED=" (from $SSH_FORWARDED)"
+ else
+ SSH_FORWARDED=
+ fi
+fi
+info="$HOSTNAME$SSH_FORWARDED"
+blank=$(echo $info | sed 's/./ /g')
+export PROMPT_COMMAND="echo -ne '\033]0;$info\007\r$blank\r'"
+unset info blank SSH_FORWARDED