Re: xterm&title
"Nikos Voutsinas" <nvoutsin@noc.uoa.gr> writes:
> Hello,
>
> I would like (somehow) to change dynamically xterm title according to
> the LOGNAME and HOSTNAME env. Anyone who can help?
Hello I've got the following pieces of code in my .bashrc/ .bash_profile:
setxtermtitle() { echo -ne "\033];"$*"\007"; }
case $TERM in
xterm*)
PS1="\[\e]0;\u \h: \w\a\]\w:"
;;
*)
PS1="\w"
;;
esac
if [ $UID = 0 ]; then
PS1=$PS1'$SHLVL# '
else
PS1=$PS1'$SHLVL> '
fi
export PS1
Hth -- Peter
--
------------------------------------------------------------------------------
Peter Weiss, Baldestraße 14, 80469 München, Tel. 089/ 20232434
------------------------------------------------------------------------------
--- The foolish ones taught more to me than the wise ones ever could ---
------------------------------------------------------------------------------
Reply to:
- References:
- xterm&title
- From: "Nikos Voutsinas" <nvoutsin@noc.uoa.gr>